Redian新闻
>
gnuplot 如何画多个系列的bar chart?
avatar
gnuplot 如何画多个系列的bar chart?# TeX - TeX电子排版系统
k*m
1
看了在线文档,还是没找到如何画?
case1 case2 case3 case4
alpha 7611.84 3201.17 139.51 1803.78
beta 2677.36 2019.29 58.63 3142.04
gama 1696.36 1058.63 81.1 1101.23
我想的结果 是 三个系列alpha, beta, gama, 每种case用可以区别的bar显示在一起
a/b/g a/b/g a/b/g...
case1 case2 case3
在Excel 中可以做到。请问Gnu plot 可以做到么?
Thanks
avatar
T*n
2
# This gnuplot script will get you started.
# You need to transpose the data and save it in the format
# shown at the end of the script.
# If you want to color-fill the bars, you'll need to edit the
# EPS file that is created.
set terminal postscript eps enhanced color solid "Times-Roman" 20
set output "bargraph.eps"
set xrange [0:5]
set yrange [0:8000]
set xlabel "cases"
set ylabel "values"
set xtics ("case 1" 1, "case 2" 2, "case 3" 3, "case 4" 4)
set grid ytics
set mytics 5
set key width -9 b

【在 k**m 的大作中提到】
: 看了在线文档,还是没找到如何画?
: case1 case2 case3 case4
: alpha 7611.84 3201.17 139.51 1803.78
: beta 2677.36 2019.29 58.63 3142.04
: gama 1696.36 1058.63 81.1 1101.23
: 我想的结果 是 三个系列alpha, beta, gama, 每种case用可以区别的bar显示在一起
: a/b/g a/b/g a/b/g...
: case1 case2 case3
: 在Excel 中可以做到。请问Gnu plot 可以做到么?
: Thanks

avatar
k*m
3
哇,你太牛了吧。我正在试。先谢谢你!

【在 T*******n 的大作中提到】
: # This gnuplot script will get you started.
: # You need to transpose the data and save it in the format
: # shown at the end of the script.
: # If you want to color-fill the bars, you'll need to edit the
: # EPS file that is created.
: set terminal postscript eps enhanced color solid "Times-Roman" 20
: set output "bargraph.eps"
: set xrange [0:5]
: set yrange [0:8000]
: set xlabel "cases"

avatar
k*m
4
的确成功了!
就是我的gnuplot 是3.7,似乎不支持 fill style. 否则就十全十美了。
再次感谢!

【在 T*******n 的大作中提到】
: # This gnuplot script will get you started.
: # You need to transpose the data and save it in the format
: # shown at the end of the script.
: # If you want to color-fill the bars, you'll need to edit the
: # EPS file that is created.
: set terminal postscript eps enhanced color solid "Times-Roman" 20
: set output "bargraph.eps"
: set xrange [0:5]
: set yrange [0:8000]
: set xlabel "cases"

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。