Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2126
| Newsgroups | comp.graphics.apps.gnuplot |
|---|---|
| Date | 2013-10-09 09:26 -0700 |
| References | <54e6d656-8116-4125-84be-8851fbf84787@googlegroups.com> <l333sm$stg$1@news.rz.uni-karlsruhe.de> <2a8e5871-f2b2-48de-9955-e928e71c91fd@googlegroups.com> <d5939053-13a4-4741-9ab3-df9a6b9b73f3@googlegroups.com> |
| Message-ID | <2abb3c8a-38c8-4b15-a28d-166a06293a72@googlegroups.com> (permalink) |
| Subject | Re: graph from the string/numeric column. |
| From | thesunshine99@gmail.com |
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
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
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
csiph-web