Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2121 > unrolled thread

graph from the string/numeric column.

Started bythesunshine99@gmail.com
First post2013-10-08 13:42 -0700
Last post2013-10-21 11:02 -0700
Articles 19 — 4 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-08 13:42 -0700
    Re: graph from the string/numeric column. Karl <mail.kfr@gmx.net> - 2013-10-09 10:24 +0200
      Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-09 07:27 -0700
        Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-09 08:25 -0700
          Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-09 09:26 -0700
            Re: graph from the string/numeric column. Karl <mail.kfr@gmx.net> - 2013-10-10 09:37 +0200
              Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-10 12:41 -0700
                Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-10 13:33 -0700
                  Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-10 13:53 -0700
                    Re: graph from the string/numeric column. Karl <mail.kfr@gmx.net> - 2013-10-11 10:41 +0200
                      Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-11 08:12 -0700
                        Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-11 13:22 -0700
                        Re: graph from the string/numeric column. Karl <mail.kfr@gmx.net> - 2013-10-14 14:39 +0200
                          Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-14 10:07 -0700
                            Re: graph from the string/numeric column. Karl <mail.kfr@gmx.net> - 2013-10-16 18:59 +0200
                              Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-16 21:42 -0700
                                Re: graph from the string/numeric column. Karl <ratzsch@polymer.uka.de> - 2013-10-20 09:48 +0200
                                Re: graph from the string/numeric column. sfeam <sfeam@users.sourceforge.net> - 2013-10-20 12:08 -0700
                                  Re: graph from the string/numeric column. thesunshine99@gmail.com - 2013-10-21 11:02 -0700

#2121 — graph from the string/numeric column.

Fromthesunshine99@gmail.com
Date2013-10-08 13:42 -0700
Subjectgraph from the string/numeric column.
Message-ID<54e6d656-8116-4125-84be-8851fbf84787@googlegroups.com>
I want create the graph from the string column but the column has repetitive  values. I am not able to make it working so far.

2 col should be y axis
3 col should be line graph or bar
1 col should be legend or the x axis.

server1 35000 105
server1 35000 105
server1 35000 280
server1 35000 280
server1 35000 280
server1 35000 280
server1 35000 280
server1 35000 280
server1 35000 280
server1 35000 420
server1 35000 420
server1 35000 420
server1 35000 420
server2 49000 0
server2 49000 0
server2 49000 0
server2 49000 0
server2 49000 0
server2 49000 0
server2 49000 0
server2 49000 0
server2 49000 0
server2 49000 0
server2 49000 0
server2 49000 0
server2 49000 0
server3 49000 1372
server3 49000 1372
server3 49000 1372
server3 49000 1372
server3 49000 1372
server3 49000 1372
server3 49000 1372
server3 49000 1372
server3 49000 1372
server3 49000 1372
server3 49000 1372
server3 49000 8967
server3 49000 9016
server4 49000 0
server4 49000 0

[toc] | [next] | [standalone]


#2123

FromKarl <mail.kfr@gmx.net>
Date2013-10-09 10:24 +0200
Message-ID<l333sm$stg$1@news.rz.uni-karlsruhe.de>
In reply to#2121
Am 08.10.2013 22:42, schrieb thesunshine99@gmail.com:
> I want create the graph from the string column but the column has repetitive  values. I am not able to make it working so far.
> 
> 2 col should be y axis
> 3 col should be line graph or bar
> 1 col should be legend or the x axis.
> 
> server1 35000 105
> server1 35000 105

Sorry, i don´t understand what you want the plot to look like. Column
one should be x, two be y, what is col three then?

Also col one contains a text string, do you want "x" in "serverx" to be
the x value? I´m not sure gnuplot can extract x easily.

You can make a column give the labels for the xtics with "xticslabels", i.e.

plot "" using 2:3:xticlabels(1)


  Karl

(and please sign your posts. that´s basic netiquette.)


[toc] | [prev] | [next] | [standalone]


#2124

Fromthesunshine99@gmail.com
Date2013-10-09 07:27 -0700
Message-ID<2a8e5871-f2b2-48de-9955-e928e71c91fd@googlegroups.com>
In reply to#2123
On Wednesday, October 9, 2013 3:24:54 AM UTC-5, Karl wrote:
> Am 08.10.2013 22:42, schrieb thesunshine99@gmail.com:
> 
> > I want create the graph from the string column but the column has repetitive  values. I am not able to make it working so far.
> 
> > 
> 
> > 2 col should be y axis
> 
> > 3 col should be line graph or bar
> 
> > 1 col should be legend or the x axis.
> 
> > 
> 
> > server1 35000 105
> 
> > server1 35000 105
> 
> 
> 
> Sorry, i don´t understand what you want the plot to look like. Column
> 
> one should be x, two be y, what is col three then?
> 
> 
> 
> Also col one contains a text string, do you want "x" in "serverx" to be
> 
> the x value? I´m not sure gnuplot can extract x easily.
> 
> 
> 
> You can make a column give the labels for the xtics with "xticslabels", i.e.
> 
> 
> 
> plot "" using 2:3:xticlabels(1)
> 
> 
> 
> 
> 
>   Karl
> 
> 
> 
> (and please sign your posts. that´s basic netiquette.)

I apologize for that. Let me change the data a bit.

Server1	105	280	420				
Server2	0						
Server3	1372	9016					
Server4	0						
Server5	0						
Server6	0						
Server7	1120						
Server8	0						
Server9	10640	11655	3955	7175	7910	7945	
Server10	945						
Server11	1050	1085	420	455	490	525	560
Server12	21385						
Server13	1435	3780					
Server14	0						

I would like to have the bar graph wiht col1 as legends and rest of columns as on y axis.

S

[toc] | [prev] | [next] | [standalone]


#2125

Fromthesunshine99@gmail.com
Date2013-10-09 08:25 -0700
Message-ID<d5939053-13a4-4741-9ab3-df9a6b9b73f3@googlegroups.com>
In reply to#2124
On Wednesday, October 9, 2013 9:27:48 AM UTC-5, thesun...@gmail.com wrote:
> On Wednesday, October 9, 2013 3:24:54 AM UTC-5, Karl wrote:
> 
> > Am 08.10.2013 22:42, schrieb thesunshine99@gmail.com:
> 
> > 
> 
> > > I want create the graph from the string column but the column has repetitive  values. I am not able to make it working so far.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 2 col should be y axis
> 
> > 
> 
> > > 3 col should be line graph or bar
> 
> > 
> 
> > > 1 col should be legend or the x axis.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > server1 35000 105
> 
> > 
> 
> > > server1 35000 105
> 
> > 
> 
> > 
> 
> > 
> 
> > Sorry, i don´t understand what you want the plot to look like. Column
> 
> > 
> 
> > one should be x, two be y, what is col three then?
> 
> > 
> 
> > 
> 
> > 
> 
> > Also col one contains a text string, do you want "x" in "serverx" to be
> 
> > 
> 
> > the x value? I´m not sure gnuplot can extract x easily.
> 
> > 
> 
> > 
> 
> > 
> 
> > You can make a column give the labels for the xtics with "xticslabels", i.e.
> 
> > 
> 
> > 
> 
> > 
> 
> > plot "" using 2:3:xticlabels(1)
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> >   Karl
> 
> > 
> 
> > 
> 
> > 
> 
> > (and please sign your posts. that´s basic netiquette.)
> 
> 
> 
> I apologize for that. Let me change the data a bit.
> 
> 
> 
> Server1	105	280	420				
> 
> Server2	0						
> 
> Server3	1372	9016					
> 
> Server4	0						
> 
> Server5	0						
> 
> Server6	0						
> 
> Server7	1120						
> 
> Server8	0						
> 
> Server9	10640	11655	3955	7175	7910	7945	
> 
> Server10	945						
> 
> Server11	1050	1085	420	455	490	525	560
> 
> Server12	21385						
> 
> Server13	1435	3780					
> 
> Server14	0						
> 
> 
> 
> I would like to have the bar graph wiht col1 as legends and rest of columns as on y axis.
> 
> 
> 
> S

I have tried to create the graph wiht the mentioned data. But I can't incorporate all the column2 to last. First column becomes the x-axis. I would like the number(s) like 0,1,2,3,..n in the x axis. And y axis should adjust automatically depends on the columns2 onward.


cat << EOF | /usr/local/bin/gnuplot
        set terminal postscript eps enhanced color
        set output  "/tmp/tsm.ps"
        set  autoscale
        set grid
        set title "Usage"
        set xlabel "Server Name"
        set ylabel "GB"
        set yr [0:]
	#set key autotitle columnheader
	set key off
        set style data histogram
        set style histogram cluster gap 1
        set style fill solid border -1
        set boxwidth 0.9
        set xtics nomirror rotate by -90 font ",16"
	#plot '/tmp/_tsm'  using 3:xticlabel(1) title 'XYZ' with lines  lt 1 lw 2 
	plot '/tmp/_tsm' using 2:xticlabels(1) with histogram
 
EOF

[toc] | [prev] | [next] | [standalone]


#2126

Fromthesunshine99@gmail.com
Date2013-10-09 09:26 -0700
Message-ID<2abb3c8a-38c8-4b15-a28d-166a06293a72@googlegroups.com>
In reply to#2125
On Wednesday, October 9, 2013 10:25:01 AM UTC-5, thesun...@gmail.com wrote:
> On Wednesday, October 9, 2013 9:27:48 AM UTC-5, thesun...@gmail.com wrote:
> 
> > On Wednesday, October 9, 2013 3:24:54 AM UTC-5, Karl wrote:
> 
> > 
> 
> > > Am 08.10.2013 22:42, schrieb thesunshine99@gmail.com:
> 
> > 
> 
> > > 
> 
> > 
> 
> > > > I want create the graph from the string column but the column has repetitive  values. I am not able to make it working so far.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > > 2 col should be y axis
> 
> > 
> 
> > > 
> 
> > 
> 
> > > > 3 col should be line graph or bar
> 
> > 
> 
> > > 
> 
> > 
> 
> > > > 1 col should be legend or the x axis.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > > server1 35000 105
> 
> > 
> 
> > > 
> 
> > 
> 
> > > > server1 35000 105
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > Sorry, i don´t understand what you want the plot to look like. Column
> 
> > 
> 
> > > 
> 
> > 
> 
> > > one should be x, two be y, what is col three then?
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > Also col one contains a text string, do you want "x" in "serverx" to be
> 
> > 
> 
> > > 
> 
> > 
> 
> > > the x value? I´m not sure gnuplot can extract x easily.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > You can make a column give the labels for the xtics with "xticslabels", i.e.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > plot "" using 2:3:xticlabels(1)
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > >   Karl
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > (and please sign your posts. that´s basic netiquette.)
> 
> > 
> 
> > 
> 
> > 
> 
> > I apologize for that. Let me change the data a bit.
> 
> > 
> 
> > 
> 
> > 
> 
> > Server1	105	280	420				
> 
> > 
> 
> > Server2	0						
> 
> > 
> 
> > Server3	1372	9016					
> 
> > 
> 
> > Server4	0						
> 
> > 
> 
> > Server5	0						
> 
> > 
> 
> > Server6	0						
> 
> > 
> 
> > Server7	1120						
> 
> > 
> 
> > Server8	0						
> 
> > 
> 
> > Server9	10640	11655	3955	7175	7910	7945	
> 
> > 
> 
> > Server10	945						
> 
> > 
> 
> > Server11	1050	1085	420	455	490	525	560
> 
> > 
> 
> > Server12	21385						
> 
> > 
> 
> > Server13	1435	3780					
> 
> > 
> 
> > Server14	0						
> 
> > 
> 
> > 
> 
> > 
> 
> > I would like to have the bar graph wiht col1 as legends and rest of columns as on y axis.
> 
> > 
> 
> > 
> 
> > 
> 
> > S
> 
> 
> 
> I have tried to create the graph wiht the mentioned data. But I can't incorporate all the column2 to last. First column becomes the x-axis. I would like the number(s) like 0,1,2,3,..n in the x axis. And y axis should adjust automatically depends on the columns2 onward.
> 
> 
> 
> 
> 
> cat << EOF | /usr/local/bin/gnuplot
> 
>         set terminal postscript eps enhanced color
> 
>         set output  "/tmp/tsm.ps"
> 
>         set  autoscale
> 
>         set grid
> 
>         set title "Usage"
> 
>         set xlabel "Server Name"
> 
>         set ylabel "GB"
> 
>         set yr [0:]
> 
> 	#set key autotitle columnheader
> 
> 	set key off
> 
>         set style data histogram
> 
>         set style histogram cluster gap 1
> 
>         set style fill solid border -1
> 
>         set boxwidth 0.9
> 
>         set xtics nomirror rotate by -90 font ",16"
> 
> 	#plot '/tmp/_tsm'  using 3:xticlabel(1) title 'XYZ' with lines  lt 1 lw 2 
> 
> 	plot '/tmp/_tsm' using 2:xticlabels(1) with histogram
> 
>  
> 
> EOF


I have tried this but I can't able to make the first column as legends when gnuplot create the histogram.

cat /tmp/_pp

Server1	105	280	420				
Server2	0						
Server3	1372	9016					
Server4	0						
Server5	0						
Server6	0						
Server7	1120						
Server8	0						
Server9	10640	11655	3955	7175	7910	7945	
Server10	945						
Server11	1050	1085	420	455	490	525	560
Server12	21385						
Server13	1435	3780					
Server14	0						

-----------

cat << EOF | /usr/local/bin/gnuplot
        set terminal postscript eps enhanced color
        set output  "/tmp/abc.ps"
        set  autoscale
        set grid
        set title "Usage"
        set xlabel "Numbers"
        set ylabel "GB"
        set yr [0:]
       set style data histogram
        set style histogram cluster gap 1 
        set style fill solid border -1 
        set boxwidth 4  relative
		set xr [-1:]
       
		plot for [COL=2:10] '/tmp/_pp' using COL  
 
EOF

[toc] | [prev] | [next] | [standalone]


#2131

FromKarl <mail.kfr@gmx.net>
Date2013-10-10 09:37 +0200
Message-ID<l35lg6$1qc$1@news.rz.uni-karlsruhe.de>
In reply to#2126
Am 09.10.2013 18:26, schrieb thesunshine99@gmail.com:
>        
> 		plot for [COL=2:10] '/tmp/_pp' using COL  


(Why the histogram?)

You can use the line numbers as abscissa values,


plot for [COL=2:10] "" using 0:COL:xticlab(1)




  Karl

[toc] | [prev] | [next] | [standalone]


#2132

Fromthesunshine99@gmail.com
Date2013-10-10 12:41 -0700
Message-ID<2121c7cf-e691-48c2-bd54-1ada50f3372f@googlegroups.com>
In reply to#2131
On Thursday, October 10, 2013 2:37:47 AM UTC-5, Karl wrote:
> Am 09.10.2013 18:26, schrieb thesunshine99@gmail.com:
> 
> >        
> 
> > 		plot for [COL=2:10] '/tmp/_pp' using COL  
> 
> 
> 
> 
> 
> (Why the histogram?)
> 
> 
> 
> You can use the line numbers as abscissa values,
> 
> 
> 
> 
> 
> plot for [COL=2:10] "" using 0:COL:xticlab(1)
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   Karl

Its perfect Karl. I appreciate your help. There wasn't any reason for the histogram. I couldn't figure out which type of the graph to use so I stumbled on the histogram.

cat << EOF | /usr/local/bin/gnuplot
        set terminal postscript eps enhanced color
        set output  "/tmp/abc.ps"
        set autoscale
        set grid
        set title "Usage"
        set xlabel "Numbers"
        set ylabel "GB"
        set yr [0:]
	set key off
	set xr [-1:]
        set xtics nomirror rotate by -90 font ",16"
	plot for [COL=2:$maxnoofcol] '/tmp/p'  using 0:COL:xticlab(1)   lw 5
 
EOF

[toc] | [prev] | [next] | [standalone]


#2133

Fromthesunshine99@gmail.com
Date2013-10-10 13:33 -0700
Message-ID<2d8e079f-e709-4122-ad24-90dd67b6c153@googlegroups.com>
In reply to#2132
On Thursday, October 10, 2013 2:41:10 PM UTC-5, thesun...@gmail.com wrote:
> On Thursday, October 10, 2013 2:37:47 AM UTC-5, Karl wrote:
> 
> > Am 09.10.2013 18:26, schrieb thesunshine99@gmail.com:
> 
> > 
> 
> > >        
> 
> > 
> 
> > > 		plot for [COL=2:10] '/tmp/_pp' using COL  
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > (Why the histogram?)
> 
> > 
> 
> > 
> 
> > 
> 
> > You can use the line numbers as abscissa values,
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > plot for [COL=2:10] "" using 0:COL:xticlab(1)
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> >   Karl
> 
> 
> 
> Its perfect Karl. I appreciate your help. There wasn't any reason for the histogram. I couldn't figure out which type of the graph to use so I stumbled on the histogram.
> 
> 
> 
> cat << EOF | /usr/local/bin/gnuplot
> 
>         set terminal postscript eps enhanced color
> 
>         set output  "/tmp/abc.ps"
> 
>         set autoscale
> 
>         set grid
> 
>         set title "Usage"
> 
>         set xlabel "Numbers"
> 
>         set ylabel "GB"
> 
>         set yr [0:]
> 
> 	set key off
> 
> 	set xr [-1:]
> 
>         set xtics nomirror rotate by -90 font ",16"
> 
> 	plot for [COL=2:$maxnoofcol] '/tmp/p'  using 0:COL:xticlab(1)   lw 5
> 
>  
> 
> EOF

Now if I have to change the data a bit. I have added two more columns with date in it. X axis should be date. Y axis should be the col2 ( as size) and line inside the graph should represent the each server with different color with legends.


server1 35000 105 09-26-13
server1 35000 105 09-27-13
server1 35000 280 09-28-13
server1 35000 280 09-29-13
server1 35000 280 09-30-13
server1 35000 280 10-01-13
server1 35000 280 10-02-13
server1 35000 280 10-03-13
server1 35000 280 10-04-13
server1 35000 420 10-05-13
server1 35000 420 10-06-13
server1 35000 420 10-07-13
server1 35000 420 10-08-13
server1 35000 420 10-09-13
server1 35000 420 10-10-13
server2 49000 0 09-26-13
server2 49000 0 09-27-13
server2 49000 0 09-28-13
server2 49000 0 09-29-13
server2 49000 0 09-30-13
server2 49000 0 10-01-13
server2 49000 0 10-02-13
server2 49000 0 10-03-13
server2 49000 0 10-04-13
server2 49000 0 10-05-13
server2 49000 0 10-06-13
server2 49000 0 10-07-13
server2 49000 0 10-08-13
server2 49000 0 10-09-13
server2 49000 0 10-10-13
server3 49000 1372 09-26-13
server3 49000 1372 09-27-13
server3 49000 1372 09-28-13
server3 49000 1372 09-29-13
server3 49000 1372 09-30-13
server3 49000 1372 10-01-13
server3 49000 1372 10-02-13
server3 49000 1372 10-03-13
server3 49000 1372 10-04-13
server3 49000 1372 10-05-13
server3 49000 1372 10-06-13
server3 49000 8967 10-08-13
server3 49000 8967 10-09-13
server3 49000 8967 10-10-13
server3 49000 9016 10-07-13
server4 49000 0 09-26-13
server4 49000 0 09-27-13
server4 49000 0 09-28-13
server4 49000 0 09-29-13
server4 49000 0 09-30-13
server4 49000 0 10-01-13
server4 49000 0 10-02-13
server4 49000 0 10-03-13
server4 49000 0 10-04-13
server4 49000 0 10-05-13

[toc] | [prev] | [next] | [standalone]


#2134

Fromthesunshine99@gmail.com
Date2013-10-10 13:53 -0700
Message-ID<91d8095a-5a86-48ca-97be-b3b79d22232d@googlegroups.com>
In reply to#2133
On Thursday, October 10, 2013 3:33:49 PM UTC-5, thesun...@gmail.com wrote:
> On Thursday, October 10, 2013 2:41:10 PM UTC-5, thesun...@gmail.com wrote:
> 
> > On Thursday, October 10, 2013 2:37:47 AM UTC-5, Karl wrote:
> 
> > 
> 
> > > Am 09.10.2013 18:26, schrieb thesunshine99@gmail.com:
> 
> > 
> 
> > > 
> 
> > 
> 
> > > >        
> 
> > 
> 
> > > 
> 
> > 
> 
> > > > 		plot for [COL=2:10] '/tmp/_pp' using COL  
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > (Why the histogram?)
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > You can use the line numbers as abscissa values,
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > plot for [COL=2:10] "" using 0:COL:xticlab(1)
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > > 
> 
> > 
> 
> > >   Karl
> 
> > 
> 
> > 
> 
> > 
> 
> > Its perfect Karl. I appreciate your help. There wasn't any reason for the histogram. I couldn't figure out which type of the graph to use so I stumbled on the histogram.
> 
> > 
> 
> > 
> 
> > 
> 
> > cat << EOF | /usr/local/bin/gnuplot
> 
> > 
> 
> >         set terminal postscript eps enhanced color
> 
> > 
> 
> >         set output  "/tmp/abc.ps"
> 
> > 
> 
> >         set autoscale
> 
> > 
> 
> >         set grid
> 
> > 
> 
> >         set title "Usage"
> 
> > 
> 
> >         set xlabel "Numbers"
> 
> > 
> 
> >         set ylabel "GB"
> 
> > 
> 
> >         set yr [0:]
> 
> > 
> 
> > 	set key off
> 
> > 
> 
> > 	set xr [-1:]
> 
> > 
> 
> >         set xtics nomirror rotate by -90 font ",16"
> 
> > 
> 
> > 	plot for [COL=2:$maxnoofcol] '/tmp/p'  using 0:COL:xticlab(1)   lw 5
> 
> > 
> 
> >  
> 
> > 
> 
> > EOF
> 
> 
> 
> Now if I have to change the data a bit. I have added two more columns with date in it. X axis should be date. Y axis should be the col2 ( as size) and line inside the graph should represent the each server with different color with legends.
> 
> 
> 
> 
> 
> server1 35000 105 09-26-13
> 
> server1 35000 105 09-27-13
> 
> server1 35000 280 09-28-13
> 
> server1 35000 280 09-29-13
> 
> server1 35000 280 09-30-13
> 
> server1 35000 280 10-01-13
> 
> server1 35000 280 10-02-13
> 
> server1 35000 280 10-03-13
> 
> server1 35000 280 10-04-13
> 
> server1 35000 420 10-05-13
> 
> server1 35000 420 10-06-13
> 
> server1 35000 420 10-07-13
> 
> server1 35000 420 10-08-13
> 
> server1 35000 420 10-09-13
> 
> server1 35000 420 10-10-13
> 
> server2 49000 0 09-26-13
> 
> server2 49000 0 09-27-13
> 
> server2 49000 0 09-28-13
> 
> server2 49000 0 09-29-13
> 
> server2 49000 0 09-30-13
> 
> server2 49000 0 10-01-13
> 
> server2 49000 0 10-02-13
> 
> server2 49000 0 10-03-13
> 
> server2 49000 0 10-04-13
> 
> server2 49000 0 10-05-13
> 
> server2 49000 0 10-06-13
> 
> server2 49000 0 10-07-13
> 
> server2 49000 0 10-08-13
> 
> server2 49000 0 10-09-13
> 
> server2 49000 0 10-10-13
> 
> server3 49000 1372 09-26-13
> 
> server3 49000 1372 09-27-13
> 
> server3 49000 1372 09-28-13
> 
> server3 49000 1372 09-29-13
> 
> server3 49000 1372 09-30-13
> 
> server3 49000 1372 10-01-13
> 
> server3 49000 1372 10-02-13
> 
> server3 49000 1372 10-03-13
> 
> server3 49000 1372 10-04-13
> 
> server3 49000 1372 10-05-13
> 
> server3 49000 1372 10-06-13
> 
> server3 49000 8967 10-08-13
> 
> server3 49000 8967 10-09-13
> 
> server3 49000 8967 10-10-13
> 
> server3 49000 9016 10-07-13
> 
> server4 49000 0 09-26-13
> 
> server4 49000 0 09-27-13
> 
> server4 49000 0 09-28-13
> 
> server4 49000 0 09-29-13
> 
> server4 49000 0 09-30-13
> 
> server4 49000 0 10-01-13
> 
> server4 49000 0 10-02-13
> 
> server4 49000 0 10-03-13
> 
> server4 49000 0 10-04-13
> 
> server4 49000 0 10-05-13

col3 represent the varying degree of the data points in the graphs which should be in the line format with different color represent each server.

S

[toc] | [prev] | [next] | [standalone]


#2135

FromKarl <mail.kfr@gmx.net>
Date2013-10-11 10:41 +0200
Message-ID<l38dj7$51u$1@news.rz.uni-karlsruhe.de>
In reply to#2134
Am 10.10.2013 22:53, schrieb thesunshine99@gmail.com:
> 
> col3 represent the varying degree of the data points in the graphs which should be in the line format with different color represent each server.
> 
> S
> 

You can do

.. using timecolumn(4) : ($1 eq "server1" ? $2 : 1/0)

to only plot those lines refering to "server1", and then replot with
"server2" (see also "help ternary")
You´ll also have to set the right time/date format, the help on
"timecolumn" points you to the right places.

  K

[toc] | [prev] | [next] | [standalone]


#2138

Fromthesunshine99@gmail.com
Date2013-10-11 08:12 -0700
Message-ID<48dde980-6bd1-40d9-99fe-2fd4b4863ee6@googlegroups.com>
In reply to#2135
On Friday, October 11, 2013 3:41:10 AM UTC-5, Karl wrote:
> Am 10.10.2013 22:53, schrieb thesunshine99@gmail.com:
> 
> > 
> 
> > col3 represent the varying degree of the data points in the graphs which should be in the line format with different color represent each server.
> 
> > 
> 
> > S
> 
> > 
> 
> 
> 
> You can do
> 
> 
> 
> .. using timecolumn(4) : ($1 eq "server1" ? $2 : 1/0)
> 
> 
> 
> to only plot those lines refering to "server1", and then replot with
> 
> "server2" (see also "help ternary")
> 
> You´ll also have to set the right time/date format, the help on
> 
> "timecolumn" points you to the right places.
> 
> 
> 
>   K


I have tried with this set of data but no luck so far.

cat /tmp/_pp
server1 35000 105 09-26-13
server1 35000 105 09-27-13
server1 35000 280 09-28-13
server1 35000 280 10-01-13
server1 35000 280 10-02-13
server1 35000 420 10-05-13
server1 35000 420 10-06-13

server2 49000 0 09-26-13
server2 49000 0 09-27-13
server2 49000 0 09-28-13
server2 49000 0 09-29-13
server2 49000 0 09-30-13
server2 49000 0 10-01-13
server2 49000 0 10-02-13




for server_name in `awk ' { print $1 }' /tmp/_pp | sort | uniq| sed '/^$/d'`
do
cat << EOF | /usr/local/bin/gnuplot
        set terminal postscript eps enhanced color
        set output  "/tmp/tt.ps"
        set autoscale
        set grid
        set title " Usage"
        set xlabel " Date"
        set ylabel "GB"
        set yr [0:$maxsize]
		set key off
		set xr [-1:]
        set xtics nomirror rotate by -90 font ",16"
		set xdata time
        set timefmt "%m-%d-%y"
        set format x "%m/%d"
		plot   "/tmp/_pp" every :1 using 4:((strcol(1) eq "$server_name")?3:1/0) 
EOF
done

[toc] | [prev] | [next] | [standalone]


#2139

Fromthesunshine99@gmail.com
Date2013-10-11 13:22 -0700
Message-ID<c28bda2e-50a8-47e8-a19f-3c3464fe74e5@googlegroups.com>
In reply to#2138
On Friday, October 11, 2013 10:12:10 AM UTC-5, thesun...@gmail.com wrote:
> On Friday, October 11, 2013 3:41:10 AM UTC-5, Karl wrote:
> 
> > Am 10.10.2013 22:53, schrieb thesunshine99@gmail.com:
> 
> > 
> 
> > > 
> 
> > 
> 
> > > col3 represent the varying degree of the data points in the graphs which should be in the line format with different color represent each server.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > S
> 
> > 
> 
> > > 
> 
> > 
> 
> > 
> 
> > 
> 
> > You can do
> 
> > 
> 
> > 
> 
> > 
> 
> > .. using timecolumn(4) : ($1 eq "server1" ? $2 : 1/0)
> 
> > 
> 
> > 
> 
> > 
> 
> > to only plot those lines refering to "server1", and then replot with
> 
> > 
> 
> > "server2" (see also "help ternary")
> 
> > 
> 
> > You´ll also have to set the right time/date format, the help on
> 
> > 
> 
> > "timecolumn" points you to the right places.
> 
> > 
> 
> > 
> 
> > 
> 
> >   K
> 
> 
> 
> 
> 
> I have tried with this set of data but no luck so far.
> 
> 
> 
> cat /tmp/_pp
> 
> server1 35000 105 09-26-13
> 
> server1 35000 105 09-27-13
> 
> server1 35000 280 09-28-13
> 
> server1 35000 280 10-01-13
> 
> server1 35000 280 10-02-13
> 
> server1 35000 420 10-05-13
> 
> server1 35000 420 10-06-13
> 
> 
> 
> server2 49000 0 09-26-13
> 
> server2 49000 0 09-27-13
> 
> server2 49000 0 09-28-13
> 
> server2 49000 0 09-29-13
> 
> server2 49000 0 09-30-13
> 
> server2 49000 0 10-01-13
> 
> server2 49000 0 10-02-13
> 
> 
> 
> 
> 
> 
> 
> 
> 
> for server_name in `awk ' { print $1 }' /tmp/_pp | sort | uniq| sed '/^$/d'`
> 
> do
> 
> cat << EOF | /usr/local/bin/gnuplot
> 
>         set terminal postscript eps enhanced color
> 
>         set output  "/tmp/tt.ps"
> 
>         set autoscale
> 
>         set grid
> 
>         set title " Usage"
> 
>         set xlabel " Date"
> 
>         set ylabel "GB"
> 
>         set yr [0:$maxsize]
> 
> 		set key off
> 
> 		set xr [-1:]
> 
>         set xtics nomirror rotate by -90 font ",16"
> 
> 		set xdata time
> 
>         set timefmt "%m-%d-%y"
> 
>         set format x "%m/%d"
> 
> 		plot   "/tmp/_pp" every :1 using 4:((strcol(1) eq "$server_name")?3:1/0) title $server_name
> 
> EOF
> 
> done

[toc] | [prev] | [next] | [standalone]


#2143

FromKarl <mail.kfr@gmx.net>
Date2013-10-14 14:39 +0200
Message-ID<l3gom1$qdp$1@news.rz.uni-karlsruhe.de>
In reply to#2138
Am 11.10.2013 17:12, schrieb thesunshine99@gmail.com:
> cat /tmp/_pp
> server1 35000 105 09-26-13
> server1 35000 105 09-27-13
> server1 35000 280 09-28-13
> server1 35000 280 10-01-13
> server1 35000 280 10-02-13
> server1 35000 420 10-05-13
> server1 35000 420 10-06-13
> 
> server2 49000 0 09-26-13
> server2 49000 0 09-27-13
> server2 49000 0 09-28-13
> server2 49000 0 09-29-13
> server2 49000 0 09-30-13
> server2 49000 0 10-01-13
> server2 49000 0 10-02-13
> 
> 
> 
> 
> for server_name in `awk ' { print $1 }' /tmp/_pp | sort | uniq| sed '/^$/d'`
> do
> cat << EOF | /usr/local/bin/gnuplot

Just print two empty lines between each block, and you can address each
with "index". Then you can give an individual linecolour to each server,
etc.


plot 	"" index 1 using 4:3 with lc 1, \
	"" index 2 using 4:3 with lc 2, \
	...	

or

plot for [i=1:4] "" using 4:3 index i with lc i


P.S. Can you switch your emailer to pure text mode for newsgroups? It
looks very ugly otherwise.

[toc] | [prev] | [next] | [standalone]


#2144

Fromthesunshine99@gmail.com
Date2013-10-14 10:07 -0700
Message-ID<14d3e4f7-0da5-4220-a283-16b466fcb253@googlegroups.com>
In reply to#2143
On Monday, October 14, 2013 7:39:25 AM UTC-5, Karl wrote:
> Am 11.10.2013 17:12, schrieb thesunshine99@gmail.com:
> 
> > cat /tmp/_pp
> 
> > server1 35000 105 09-26-13
> 
> > server1 35000 105 09-27-13
> 
> > server1 35000 280 09-28-13
> 
> > server1 35000 280 10-01-13
> 
> > server1 35000 280 10-02-13
> 
> > server1 35000 420 10-05-13
> 
> > server1 35000 420 10-06-13
> 
> > 
> 
> > server2 49000 0 09-26-13
> 
> > server2 49000 0 09-27-13
> 
> > server2 49000 0 09-28-13
> 
> > server2 49000 0 09-29-13
> 
> > server2 49000 0 09-30-13
> 
> > server2 49000 0 10-01-13
> 
> > server2 49000 0 10-02-13
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > for server_name in `awk ' { print $1 }' /tmp/_pp | sort | uniq| sed '/^$/d'`
> 
> > do
> 
> > cat << EOF | /usr/local/bin/gnuplot
> 
> 
> 
> Just print two empty lines between each block, and you can address each
> 
> with "index". Then you can give an individual linecolour to each server,
> 
> etc.
> 
> 
> 
> 
> 
> plot 	"" index 1 using 4:3 with lc 1, \
> 
> 	"" index 2 using 4:3 with lc 2, \
> 
> 	...	
> 
> 
> 
> or
> 
> 
> 
> plot for [i=1:4] "" using 4:3 index i with lc i
> 
> 
> 
> 
> 
> P.S. Can you switch your emailer to pure text mode for newsgroups? It
> 
> looks very ugly otherwise.

I apologize the mail text mode. I am just replying from the existing mail. Not sure where to change it.

With this set of data which has two blank lines between the block.

server1 35000 105 09-26-13
server1 35000 105 09-27-13
server1 35000 280 09-28-13
server1 35000 280 09-29-13
server1 35000 280 09-30-13


server2 49000 0 09-26-13
server2 49000 0 09-27-13
server2 49000 0 09-28-13
server2 49000 0 09-29-13
server2 49000 0 09-30-13

And the code is

emptylines=`grep "^$" /tmp/_pp| wc -l`
emptylines=`expr $emptylines / 2`

for server_name in `awk ' { print $1 }' /tmp/_pp | sort | uniq| sed '/^$/d'`
do
cat << EOF | /usr/local/bin/gnuplot
        set terminal postscript eps enhanced color
        set output  "/tmp/abc.ps"
        set autoscale
        set grid
        set title "Usage"
        set xlabel "Server Name"
        set ylabel "GB"
        set yr [0:$maxsize]
		set xr [-1:]
        set xtics nomirror rotate by -90 font ",16"
		set xdata time
        set timefmt "%m-%d-%y"
        set format x "%m/%d"
		plot for [i=1:$emptylines] '/tmp/_pp' index i using 4:3 with lines lc i  title '$server_name'
EOF
done

i still have no charm to fix it.

[toc] | [prev] | [next] | [standalone]


#2151

FromKarl <mail.kfr@gmx.net>
Date2013-10-16 18:59 +0200
Message-ID<l3mgl1$674$1@news.rz.uni-karlsruhe.de>
In reply to#2144
Am 14.10.2013 19:07, schrieb thesunshine99@gmail.com:
> On Monday, October 14, 2013 7:39:25 AM UTC-5, Karl wrote:
>> Am 11.10.2013 17:12, schrieb thesunshine99@gmail.com:
>>
>>> cat /tmp/_pp
>>
>>> server1 35000 105 09-26-13
>>
>>> server1 35000 105 09-27-13
>>
>>> server1 35000 280 09-28-13
>>
>>> server1 35000 280 10-01-13
>>
>>> server1 35000 280 10-02-13
>>
>>> server1 35000 420 10-05-13
>>
>>> server1 35000 420 10-06-13
>>
>>>
>>
>>> server2 49000 0 09-26-13
>>
>>> server2 49000 0 09-27-13
>>
>>> server2 49000 0 09-28-13
>>
>>> server2 49000 0 09-29-13
>>
>>> server2 49000 0 09-30-13
>>
>>> server2 49000 0 10-01-13
>>
>>> server2 49000 0 10-02-13
>>
>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>> for server_name in `awk ' { print $1 }' /tmp/_pp | sort | uniq| sed '/^$/d'`
>>
>>> do
>>
>>> cat << EOF | /usr/local/bin/gnuplot
>>
>>
>>
>> Just print two empty lines between each block, and you can address each
>>
>> with "index". Then you can give an individual linecolour to each server,
>>
>> etc.
>>
>>
>>
>>
>>
>> plot 	"" index 1 using 4:3 with lc 1, \
>>
>> 	"" index 2 using 4:3 with lc 2, \
>>
>> 	...	
>>
>>
>>
>> or
>>
>>
>>
>> plot for [i=1:4] "" using 4:3 index i with lc i
>>
>>
>>
>>
>>
>> P.S. Can you switch your emailer to pure text mode for newsgroups? It
>>
>> looks very ugly otherwise.
> 
> I apologize the mail text mode. I am just replying from the existing mail. Not sure where to change it.
> 
> With this set of data which has two blank lines between the block.
> 
> server1 35000 105 09-26-13
> server1 35000 105 09-27-13
> server1 35000 280 09-28-13
> server1 35000 280 09-29-13
> server1 35000 280 09-30-13
> 
> 
> server2 49000 0 09-26-13
> server2 49000 0 09-27-13
> server2 49000 0 09-28-13
> server2 49000 0 09-29-13
> server2 49000 0 09-30-13
> 
> And the code is
> 
> emptylines=`grep "^$" /tmp/_pp| wc -l`
> emptylines=`expr $emptylines / 2`
> 
> for server_name in `awk ' { print $1 }' /tmp/_pp | sort | uniq| sed '/^$/d'`
> do
> cat << EOF | /usr/local/bin/gnuplot
>         set terminal postscript eps enhanced color
>         set output  "/tmp/abc.ps"
>         set autoscale
>         set grid
>         set title "Usage"
>         set xlabel "Server Name"
>         set ylabel "GB"
>         set yr [0:$maxsize]
> 		set xr [-1:]
>         set xtics nomirror rotate by -90 font ",16"
> 		set xdata time
>         set timefmt "%m-%d-%y"
>         set format x "%m/%d"
> 		plot for [i=1:$emptylines] '/tmp/_pp' index i using 4:3 with lines lc i  title '$server_name'
> EOF
> done
> 
> i still have no charm to fix it.
> 

I´ve copied your example dataset to "test.txt" and did

set yrange [-10:] # just that the points at zero are visible
set xdata time
set timefmt "%m-%d-%y"
set format x "%m/%d"

plot for [i=0:1] 'test.txt' index i using 4:3 \
		with lines lc i  title sprintf("%.f",i)


an i get a graph "0" from 105 up to 280, and a graph "1" at zero, over
september dates.

Note that the first dataset has index zero, not one. I do not understand
your maxsize and emptylines variables, and why do you set xrange [-1:] ?

  Karl

[toc] | [prev] | [next] | [standalone]


#2156

Fromthesunshine99@gmail.com
Date2013-10-16 21:42 -0700
Message-ID<b8af0481-4409-4bfc-a06c-99bd3c5fd306@googlegroups.com>
In reply to#2151
On Wednesday, October 16, 2013 11:59:10 AM UTC-5, Karl wrote:
> Am 14.10.2013 19:07, schrieb thesunshine99@gmail.com:
> 
> > On Monday, October 14, 2013 7:39:25 AM UTC-5, Karl wrote:
> 
> >> Am 11.10.2013 17:12, schrieb thesunshine99@gmail.com:
> 
> >>
> 
> >>> cat /tmp/_pp
> 
> >>
> 
> >>> server1 35000 105 09-26-13
> 
> >>
> 
> >>> server1 35000 105 09-27-13
> 
> >>
> 
> >>> server1 35000 280 09-28-13
> 
> >>
> 
> >>> server1 35000 280 10-01-13
> 
> >>
> 
> >>> server1 35000 280 10-02-13
> 
> >>
> 
> >>> server1 35000 420 10-05-13
> 
> >>
> 
> >>> server1 35000 420 10-06-13
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> server2 49000 0 09-26-13
> 
> >>
> 
> >>> server2 49000 0 09-27-13
> 
> >>
> 
> >>> server2 49000 0 09-28-13
> 
> >>
> 
> >>> server2 49000 0 09-29-13
> 
> >>
> 
> >>> server2 49000 0 09-30-13
> 
> >>
> 
> >>> server2 49000 0 10-01-13
> 
> >>
> 
> >>> server2 49000 0 10-02-13
> 
> >>
> 
> >>>
> 
> >>
> 
> >>>
> 
> >>
> 
> >>>
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> for server_name in `awk ' { print $1 }' /tmp/_pp | sort | uniq| sed '/^$/d'`
> 
> >>
> 
> >>> do
> 
> >>
> 
> >>> cat << EOF | /usr/local/bin/gnuplot
> 
> >>
> 
> >>
> 
> >>
> 
> >> Just print two empty lines between each block, and you can address each
> 
> >>
> 
> >> with "index". Then you can give an individual linecolour to each server,
> 
> >>
> 
> >> etc.
> 
> >>
> 
> >>
> 
> >>
> 
> >>
> 
> >>
> 
> >> plot 	"" index 1 using 4:3 with lc 1, \
> 
> >>
> 
> >> 	"" index 2 using 4:3 with lc 2, \
> 
> >>
> 
> >> 	...	
> 
> >>
> 
> >>
> 
> >>
> 
> >> or
> 
> >>
> 
> >>
> 
> >>
> 
> >> plot for [i=1:4] "" using 4:3 index i with lc i
> 
> >>
> 
> >>
> 
> >>
> 
> >>
> 
> >>
> 
> >> P.S. Can you switch your emailer to pure text mode for newsgroups? It
> 
> >>
> 
> >> looks very ugly otherwise.
> 
> > 
> 
> > I apologize the mail text mode. I am just replying from the existing mail. Not sure where to change it.
> 
> > 
> 
> > With this set of data which has two blank lines between the block.
> 
> > 
> 
> > server1 35000 105 09-26-13
> 
> > server1 35000 105 09-27-13
> 
> > server1 35000 280 09-28-13
> 
> > server1 35000 280 09-29-13
> 
> > server1 35000 280 09-30-13
> 
> > 
> 
> > 
> 
> > server2 49000 0 09-26-13
> 
> > server2 49000 0 09-27-13
> 
> > server2 49000 0 09-28-13
> 
> > server2 49000 0 09-29-13
> 
> > server2 49000 0 09-30-13
> 
> > 
> 
> > And the code is
> 
> > 
> 
> > emptylines=`grep "^$" /tmp/_pp| wc -l`
> 
> > emptylines=`expr $emptylines / 2`
> 
> > 
> 
> > for server_name in `awk ' { print $1 }' /tmp/_pp | sort | uniq| sed '/^$/d'`
> 
> > do
> 
> > cat << EOF | /usr/local/bin/gnuplot
> 
> >         set terminal postscript eps enhanced color
> 
> >         set output  "/tmp/abc.ps"
> 
> >         set autoscale
> 
> >         set grid
> 
> >         set title "Usage"
> 
> >         set xlabel "Server Name"
> 
> >         set ylabel "GB"
> 
> >         set yr [0:$maxsize]
> 
> > 		set xr [-1:]
> 
> >         set xtics nomirror rotate by -90 font ",16"
> 
> > 		set xdata time
> 
> >         set timefmt "%m-%d-%y"
> 
> >         set format x "%m/%d"
> 
> > 		plot for [i=1:$emptylines] '/tmp/_pp' index i using 4:3 with lines lc i  title '$server_name'
> 
> > EOF
> 
> > done
> 
> > 
> 
> > i still have no charm to fix it.
> 
> > 
> 
> 
> 
> I�ve copied your example dataset to "test.txt" and did
> 
> 
> 
> set yrange [-10:] # just that the points at zero are visible
> 
> set xdata time
> 
> set timefmt "%m-%d-%y"
> 
> set format x "%m/%d"
> 
> 
> 
> plot for [i=0:1] 'test.txt' index i using 4:3 \
> 
> 		with lines lc i  title sprintf("%.f",i)
> 
> 
> 
> 
> 
> an i get a graph "0" from 105 up to 280, and a graph "1" at zero, over
> 
> september dates.
> 
> 
> 
> Note that the first dataset has index zero, not one. I do not understand
> 
> your maxsize and emptylines variables, and why do you set xrange [-1:] ?
> 
> 
> 
>   Karl

Thx Karl. I have appreciate all your help. the maxsize is mazsize from the col2 to be use for the y-axis. The emptlines is for count the number of two blank lines between the blocks and divide by two.

Server1
Server1 35000 105 09-26-13
Server1 35000 105 09-27-13
Server1 35000 280 09-28-13
Server1 35000 280 09-29-13
Server1 35000 280 09-30-13
Server1 35000 280 10-01-13
Server1 35000 280 10-02-13
Server1 35000 280 10-03-13
Server1 35000 280 10-04-13
 
 
Server2
Server2 49000 0 09-26-13
Server2 49000 0 09-27-13
Server2 49000 0 09-28-13
Server2 49000 0 09-29-13
Server2 49000 0 09-30-13
Server2 49000 0 10-01-13
Server2 49000 0 10-02-13
Server2 49000 0 10-03-13
Server2 49000 0 10-04-13
 
 
Server3
Server3 49000 1372 09-26-13
Server3 49000 1372 09-27-13
Server3 49000 1372 09-28-13
Server3 49000 1372 09-29-13
Server3 49000 1372 09-30-13
Server3 49000 1372 10-01-13
Server3 49000 1372 10-02-13
Server3 49000 1372 10-03-13
Server3 49000 1372 10-04-13
 
 
Server4
Server4 49000 0 09-26-13
Server4 49000 0 09-27-13
Server4 49000 0 09-28-13
Server4 49000 0 09-29-13
Server4 49000 0 09-30-13
Server4 49000 0 10-01-13
Server4 49000 0 10-02-13
Server4 49000 0 10-03-13
Server4 49000 0 10-04-13

maxsize=`awk ' { print $2 }' /tmp/_pp| sort -n | uniq| tail -1`


emptylines=`grep "^ " /tmp/_pp| wc -l`
emptylines=`expr $emptylines / 2`

cat << EOF | /usr/local/bin/gnuplot
        set terminal postscript eps enhanced color
        set output  "/tmp/pp.ps"
        set autoscale
        set grid
        set title "TSM Usage"
        set xlabel " Name"
        set ylabel "GB"
        set yr [0:$maxsize]
		set key outside;
	    set xtics nomirror rotate by -90 font ",16"
		set xdata time
        set timefmt "%m-%d-%y"
        set format x "%m-%d-%y"
plot for [i=0:$emptylines] '/tmp/_pp' index i using 4:3 with lines lc i lt 1 lw 2 title columnheader(1) 
EOF

The lines color is repeating after few server. I am not sure why each server is not getting its own color. I have atleast 14+ server in the list.

[toc] | [prev] | [next] | [standalone]


#2170

FromKarl <ratzsch@polymer.uka.de>
Date2013-10-20 09:48 +0200
Message-ID<l401sa$via$1@news.rz.uni-karlsruhe.de>
In reply to#2156
> The lines color is repeating after few server. I am not sure why each server is not getting its own color. I have atleast 14+ server in the list.
> 

That is how the line colours are defined. You can easily test on the
definition by doing "test" instead of "plat ..."

If you want ot change the colours, you can define every single one by

set linestyle x lc rgb #yyyyyyy
...

and use these styles with

plot ... with ls x

or you devise a function that creates sensible rgb colour numbers
out of the running number of plots

[toc] | [prev] | [next] | [standalone]


#2175

Fromsfeam <sfeam@users.sourceforge.net>
Date2013-10-20 12:08 -0700
Message-ID<l419mi$r86$2@dont-email.me>
In reply to#2156
thesunshine99@gmail.com wrote:

> The lines color is repeating after few server. I am not sure why each
> server is not getting its own color. I have atleast 14+ server in the
> list.

See "help set linetype"

In particular notice that you can change the repeat cycle for line colors
using the command

   set linetype cycle N

(This command was not present in versions of gnuplot before 4.6)

[toc] | [prev] | [next] | [standalone]


#2177

Fromthesunshine99@gmail.com
Date2013-10-21 11:02 -0700
Message-ID<98e6264e-cb2a-43b4-a24a-fb778774d8df@googlegroups.com>
In reply to#2175
On Sunday, October 20, 2013 2:08:43 PM UTC-5, sfeam wrote:
> thesunshine99@gmail.com wrote:
> 
> 
> 
> > The lines color is repeating after few server. I am not sure why each
> 
> > server is not getting its own color. I have atleast 14+ server in the
> 
> > list.
> 
> 
> 
> See "help set linetype"
> 
> 
> 
> In particular notice that you can change the repeat cycle for line colors
> 
> using the command
> 
> 
> 
>    set linetype cycle N
> 
> 
> 
> (This command was not present in versions of gnuplot before 4.6)

I did this to make it work. Bit crude way of doing instead of function.

	set style line 1  lc rgb '#0000FF' lt 1 lw 2
	set style line 2  lc rgb '#8A2BE2' lt 1 lw 2
	set style line 3  lc rgb '#A52A2A' lt 1 lw 2
	set style line 4  lc rgb '#DEB887' lt 1 lw 2 
	set style line 5  lc rgb '#5F9EA0' lt 1 lw 2 
	set style line 6  lc rgb '#7FFF00' lt 1 lw 2 
	set style line 7  lc rgb '#D2691E' lt 1 lw 2 
	set style line 8  lc rgb '#FF7F50' lt 1 lw 2 
	set style line 9  lc rgb '#6495ED' lt 1 lw 2 
	set style line 10 lc rgb '#40E0D0' lt 1 lw 2 
	set style line 11 lc rgb '#4682B4' lt 1 lw 2 
	set style line 12 lc rgb '#800080' lt 1 lw 2 
	set style line 13 lc rgb '#2E8B57' lt 1 lw 2 
	set style line 14 lc rgb '#008B8B' lt 1 lw 2 
	set style line 15 lc rgb '#B8860B' lt 1 lw 2 
	set style line 16 lc rgb '#006400' lt 1 lw 2 
	set style line 17 lc rgb '#8B008B' lt 1 lw 2 
	set style line 18 lc rgb '#483D8B' lt 1 lw 2 
	set style line 19 lc rgb '#2F4F4F' lt 1 lw 2 
	set style line 20 lc rgb '#2F4F4F' lt 1 lw 2 
	show linestyle
	plot for [i=0:$emptylines] '/tmp/_pp' index i using 4:3 with lines ls i title columnheader(1) 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web