Path: csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!news.musoftware.de!wum.musoftware.de!news.albasani.net!not-for-mail From: Hermann Peifer Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Gnuplot to plot two columns with number of hits and users Date: Thu, 03 Feb 2011 13:39:00 +0100 Organization: albasani.net Lines: 50 Message-ID: <4D4AA1E4.8010900@gmx.eu> References: <7d7dd595-e4eb-405b-ad5e-66e0c62fd0a4@x18g2000yqe.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net /cpfwCaF0kCRIKTYgTHwnRSSGcsHPoJt21Wm5Bd2ZUl8PsljlopEE/10hrYNtxZspFQBBQ/BzkvdRUrBRtIMEg== NNTP-Posting-Date: Thu, 3 Feb 2011 12:40:05 +0000 (UTC) To: mxsquid In-Reply-To: <7d7dd595-e4eb-405b-ad5e-66e0c62fd0a4@x18g2000yqe.googlegroups.com> Cancel-Lock: sha1:G8nmMGfCBlCYoP/p+gELz56+i74= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 Injection-Info: news.albasani.net; logging-data="1SO2RahU6wP2RuTIg8zJbAQqUxFe1NCmrkBKbNWVZYXbpBO2o92UCQwUU9czXEsd/ngi+pDpvUcjHC2GVp6sYGEFUv4hrFeJjbagZQ+veoU57ubqJnc/+PNtFGJrS84B"; mail-complaints-to="abuse@albasani.net" Xref: csiph.com comp.graphics.apps.gnuplot:2071 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