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


Groups > comp.graphics.apps.gnuplot > #2071

Re: Gnuplot to plot two columns with number of hits and users

From Hermann Peifer <peifer@gmx.eu>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Gnuplot to plot two columns with number of hits and users
Date 2011-02-03 13:39 +0100
Organization albasani.net
Message-ID <4D4AA1E4.8010900@gmx.eu> (permalink)
References <7d7dd595-e4eb-405b-ad5e-66e0c62fd0a4@x18g2000yqe.googlegroups.com>

Show all headers | View raw


On 03/02/2011 04:16, mxsquid wrote:
> I would like to use Gnuplot to create a plot on the following log
> data.  The .png file is created, but no data from the column 1, hit
> count or the users are displayed.  Looking for suggestions.
> Thanks.
>
> 138360 BOB
> 62632 RON
> 60416 JOE
> 50790 BILL
> 49254 JIM
> 46200 JILL
> 43298 TOD
> 42848 TOM
> 42426 JEFF
>
> gnuplot>  set terminal png
> Terminal type set to 'png'
> Options are 'nocrop medium size 640,480 '
> gnuplot>  set output "topten.png"
> gnuplot>  set xrange [0:10]
> gnuplot>  set yrange [0:10]
> gnuplot>  set grid
> gnuplot>  set xlabel "Hits"
> gnuplot>  set ylabel "Users"
> gnuplot>  set title "top ten"
> gnuplot>  set key left box
> gnuplot>  plot "topten.log" using ($1):($2) title "hits" with lines


It looks like you want to use the x-axis for the hits and the y-axis for 
the users. As far as I know, this is not possible. You have to generate 
a "normal" gnuplot image first, then rotate it by 90 degrees, see below.

Hermann

$ cat tt.gp
set terminal png
set output "topten.png"
set style fill solid
set boxwidth 0.9 relative
set grid
set ylabel "Hits of top ten users (in 1000)"
set xtics rotate
set ytics rotate
set nokey
plot [:][0:] "topten.log" using ($1)/1000:xticlabels(2) with boxes

$ gnuplot tt.gp && convert topten.png -rotate 90 topten_rotated.png

Back to comp.graphics.apps.gnuplot | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Gnuplot to plot two columns with number of hits and users Hermann Peifer <peifer@gmx.eu> - 2011-02-03 13:39 +0100
  Re: Gnuplot to plot two columns with number of hits and users Péter Juhász <peter.juhasz83@gmail.com> - 2011-02-03 07:14 -0800

csiph-web