导出 MMA8 中损坏的一行图形对象
如何让Mathematica导出行
图形。我不喜欢 GraphicsRow 处理图形的方式,图形中的所有长宽比和填充都变得混乱。我喜欢做的是处理每个单独的图形,然后使用简单的 Row
、Column
或 Grid
来组合我的图形。以下面的例子为例:
g1 = Plot[Sin[x], {x, -Pi, Pi},
Frame -> True, FrameLabel -> {"x", "y"}, ImageSize -> 2.6*72
]
这创建了 Sin 图。我现在要做的是创建下图:
Fig = Row[{g1, g1, g1}]
然后就可以使用 Export
Export["TestFig.pdf", Fig]
这个是我在 MMA8 中获得的 pdf:
我刚刚在 MMA7 中尝试了这段代码,它工作正常。我已经有一段时间没有想创建这种类型的人物了,而且我从来没有费心去检查它在 MMA8 中是否有效。有人在 MMA8 中解决这个问题吗?
所需的输出是我在 MMA7 中获得的输出:
How do you make Mathematica export a Row
of graphics. I do not like how GraphicsRow
handles the graphics, all the aspect ratios and paddings in the figures get messed up. What I like to do is work with each individual figure and then use a simple Row
,Column
or Grid
to combine my figures. Take the following for instance:
g1 = Plot[Sin[x], {x, -Pi, Pi},
Frame -> True, FrameLabel -> {"x", "y"}, ImageSize -> 2.6*72
]
This creates the Sin plot. What I want to do now is create the following Figure:
Fig = Row[{g1, g1, g1}]
Then you can use Export
Export["TestFig.pdf", Fig]
This is the pdf I obtain in MMA8:
I just tried this code in MMA7 and it works fine. It had been a while since I wanted to create this type of figures and I never bothered to check if it worked in MMA8. Does any one have a fix for this in MMA8?
The desired output is the one I obtained in MMA7:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
值得记住的是
GraphicsGrid
假设等宽columns 因此使用Grid
有时更有用。与贝利撒留的回答中的语法相同。可能值得探索Export
的ImageSize
选项(请参阅文档 和 教程)。另外,请注意以 PDF 格式导出使用 PrintingStyleEnvironment,这不是事情的方式看在屏幕上。如果您在打印设置中更改页面设置,可能会获得更好的结果。
It is worth bearing in mind that
GraphicsGrid
assumes equal-width columns so usingGrid
is sometimes more useful. The same syntax as in belisarius' answer applies. It might be worth exploring theImageSize
option toExport
(see documentation and tutorial).Also, note the exporting in PDF format uses the PrintingStyleEnvironment, which is not how things look on screen. You might get better results if you change your page setup in Printing Settings.