来自 gnuplot 的专业图形
我知道这将是相当主观的,但我正在寻找示例脚本来从 gnuplot 生成“专业外观”的图表。我正在从数据文件中绘制 3-5 个价格过程(全部具有相同的域和相同的值范围),并且我正在寻找一组调整以使输出看起来更好,以便我可以将其包含在报告中或发布。不幸的是,我在视觉上相当残疾,所以我无法定义我真正想要的东西 - 但重点是 Mathematica 生成的默认绘图看起来不错,而 gnuplot 的默认绘图类似于 90 线。我将不胜感激完整的例子(最好是矢量格式)。
I understand this is going to be fairly subjective, but I am looking for example scripts to generate "professionally looking" graphs from gnuplot. I am plotting 3-5 price processes from a data file (all having same domain and same range of values), and I am looking for a set of tweaks to make the output look better, so that I can include it in a report or publication. Unfortunately I am rather disabled visually, so I am not able to define what I am really after - but the point is that the default plot generated by Mathematica looks kind of nice, and a default one from gnuplot resembles the 90-ties. I would be grateful for complete examples (preferably in vector format).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现 gnuplot 中的 epslatex 终端可以产生良好的结果。它需要周围有乳胶分布,但结果确实很好。尝试用类似的东西开始你的文件
之后你可以使用常规绘图命令 - gnuplot 将使用 Computer Modern 字体排版所有内容,并将生成的图像保存到
image.tex
中,你可以将其编译为 dvi 然后转换根据需要将其转换为 ps/pdf。无耻插件:我已经编写了一个 shell 脚本来为我自动化整个过程。该脚本采用 Gnuplot 脚本并输出一个 png 文件,以 300 dpi 的分辨率从 ps 采样,这对于学术期刊来说似乎足够了。当然,您可以跳过转换为 png 并仅保留 ps/pdf 图像,但我的图像往往具有大量数据点,这使得 pdf 很大(数十 MB),使它们不适合提交出版。
这是脚本的链接: http://bitbucket.org/mbudisic/cl -goodies/src/tip/figlatex
当我编写它时,我不知道如何正确使用
grep
,所以我编写了自己的regexp python脚本,figlatex
依赖于它,但你可以替换它,如果你希望的。http://bitbucket.org/mbudisic/cl-goodies/src/tip/ regexp
希望这有帮助。
I find that the
epslatex
terminal in gnuplot creates good results. It requires having a latex distribution around, but the results are really good. Try starting your file with something likeAfter this you could use regular plotting commands - gnuplot will typeset everything using Computer Modern fonts, and save the resulting image into
image.tex
which you can compile into dvi and then convert to ps/pdf as you wish.Shameless plug: I've written a shell script to automate the whole process for me. The script takes the Gnuplot script and outputs a png file, sampled from the ps at 300 dpi, which seems to be sufficient for academic journals. Of course, you could skip the conversion to png and just keep the ps/pdf image, but my images tended to have huge number of datapoints which made pdfs large (tens of MBs), making them unsuitable for submitting for publication.
Here's the link to the script: http://bitbucket.org/mbudisic/cl-goodies/src/tip/figlatex
When I wrote it, I didn't know how to use
grep
properly, so I wrote my own regexp python script, whichfiglatex
depends on, but you could replace that if you wished.http://bitbucket.org/mbudisic/cl-goodies/src/tip/regexp
Hope this helped.