you need gnuplot 4.3-cvs
set datafile separator ","
t=""
plot for [i=0:4] 'ts.dat' us ((i==0&&$0==0)?(b=$2,t=stringcolumn(1)):99 ,
$0==0?(a=b):99, $0==(i+1)?(b=$2,t=stringcolumn(1)):99 , $0):(a) with lines
title t
Daniel Clemente-2 wrote:
>
>
>
> Hi, I look for orientation on how to plot a graph I have seen no examples
> for.
>
> Imagine you have this data consisting of tower_name+tower_height:
>
> Burj Dubai, 818
> KVLY-TV mast, 628.8
> CN Tower, 553.3
> Sears Tower, 527.3
> Taipei 101, 509.2
>
> I want a graph with 5 horizontal lines, each at the height specified by
> the second parameter.
> Similar in nature to this graph:
> https://eshu.ubuntu-eu.org/cgi-bin/munin-cgi-graph/ubuntu-eu.org/eshu/smart_sdb-month.png
>
> I could do manually: plot 818 title "Burj Dubai", 628.8 title "KVLY-TV
> mast", 553.3 title "CN tower", 527.3 title "Sears Tower", 509.2 title
> "Taipei 101"
> But I want the data to be read from a file.
>
> Can this be done with a gnuplot command?
>
> Thanks,
> Daniel
>
>
>
>
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals.
> Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp as they present alongside digital heavyweights like
> Barbarian
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
--
View this message in context: http://www.nabble.com/Several-horizontal-lines-tp23804760p23818332.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|