带阴影线条的直方图(无颜色条)
我有一组数据要使用直方图绘制。我希望这些条形呈线条阴影,但不填充红色、蓝色或任何其他颜色等颜色。示例数据如下:
1 23 2 9 13
2 25 5 7 12
3 26 5 3 13
4 20 6 8 5
5 23 5 12 15
6 23 5 12 11
7 22 9 12 5
8 24 16 5 8
9 23 2 12 10
10 23 15 5 9
我也有示例代码,
set terminal jpeg medium
set output "histo.jpeg"
set boxwidth 0.75 absolute
set style fill solid 1.00 border -1
set style histogram rowstacked
set style data histograms
set xtics 1000 nomirror
set ytics 100 nomirror
set mxtics 2
set mytics 2
set ytics 10
set yrange [0:50]
set ylabel "Total time"
set xlabel "Session number"
plot 'papa2.dat' using 3 t "Server", '' using 4 t "Client", '' using 5:xtic(1) t "Network"
但是当我使用它时,我会在直方图中得到填充颜色的条形。
谁能帮助我如何用线条而不是颜色绘制图表? 非常感谢。
(注:我从互联网上获得了这些示例数据和代码)
I have a set of data to plot using histogram bars. I want the bars to be shaded in lines but not filled with colros like red, blue or any other colors. The sample data is as below:
1 23 2 9 13
2 25 5 7 12
3 26 5 3 13
4 20 6 8 5
5 23 5 12 15
6 23 5 12 11
7 22 9 12 5
8 24 16 5 8
9 23 2 12 10
10 23 15 5 9
I have the sample code as well,
set terminal jpeg medium
set output "histo.jpeg"
set boxwidth 0.75 absolute
set style fill solid 1.00 border -1
set style histogram rowstacked
set style data histograms
set xtics 1000 nomirror
set ytics 100 nomirror
set mxtics 2
set mytics 2
set ytics 10
set yrange [0:50]
set ylabel "Total time"
set xlabel "Session number"
plot 'papa2.dat' using 3 t "Server", '' using 4 t "Client", '' using 5:xtic(1) t "Network"
But when I use this I get bars in histogram filled with colors.
Can anyone help me to on how to plot the graphs in lines instead of colors?
Many thanks in advance.
(note: I got these sample data and code from internet)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想知道您想要的是本页第一张图中显示的内容: histograms.dem 。
如果是这种情况,您可以按照演示页面所示
设置样式数据线点
,或者使用 3 t“Server”和线条绘制“papa2.dat”
当您使用绘图命令时。请注意,gnuplot 项目网站上提供了更多演示脚本: gnuplot 4.4 的演示脚本
I wonder what you want is something shown in the first figure of this page: histograms.dem.
If that is the case, you can either do
set style data linespoint
as shown in the demo page, orplot 'papa2.dat' using 3 t "Server" with line
when you use the plot command.Note that you have a lot more demo scripts available in the gnuplot project website: Demo scripts for gnuplot 4.4