简体   繁体   English

通过 xmgrace 批处理生成条形图

[英]Generating bar plots via xmgrace batch

I am using gracebat of xmgrace to generate images of bar graphs (based on xvg inputs) in batch mode:我正在使用 xmgrace 的 gracebat 以批处理模式生成条形图(基于 xvg 输入)的图像:

gracebat input.xvg -hdevice PNG -nosafe -printfile output.png -hardcopy -batch grace.bfile

and here is my batch file这是我的批处理文件

s0 line type 0
s0 type BAR
s0 line color 4 # this does nothing
HARDCOPY DEVICE "PNG"
PAGE SIZE 800, 600
xaxis label char size 2.50000
yaxis label char size 2.50000
xaxis ticklabel char size 2.000000
yaxis ticklabel char size 2.000000

This is an example of the output image:这是输出图像的示例: 在此处输入图片说明

It produces what I need with the exception of the color of the bars.除了条形的颜色外,它产生了我需要的东西。 What option of the batch file could be useful to set up blue background for the bars (presently it is white/transparent) as well as to increase the thickness of the black outline?批处理文件的哪个选项可用于为条形设置蓝色背景(目前为白色/透明)以及增加黑色轮廓的厚度?

For some reason bars are treated as symbols by xmgrace, which means that what you want can be accomplished with the following lines:由于某些原因,xmgrace 将条形视为符号,这意味着您可以使用以下几行来完成您想要的操作:

s0 symbol linewidth 4
s0 symbol fill pattern 1
s0 symbol fill color 4

the first line makes the bars thicker, the last two change the colour of their background.第一行使条形更粗,最后两条更改其背景颜色。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM