Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Plot spam campaigns from text files

11 views
Skip to first unread message

Dennis

unread,
Mar 29, 2012, 5:36:45 PM3/29/12
to
I've just started using gnuplot, so perhaps I'm asking for the obvious
here.

I have the following script (with thanks to Gianluca):

set terminal png medium
set output "campaigns.png"
set size 12,12
set xdata time
set timefmt "%Y-%m-%d"
set xrange["2009-04-01":"2010-05-25"]
set yrange[0:12]
unset ytics
set xlabel "Day"
set ylabel "Campaign"


plot "campaign1.txt" using 2:1:($3/sqrt($3)) title "Campaign 1" with
points lw 10 pointsize variable pt 7, "campaign2.txt" using 2:1:($3/
sqrt($3)) title "Campaign 2" with points pointsize variable lw 10 pt 7

# both campaign1.txt and campaign2.txt look like
1 2009-6-27 2
1 2009-6-20 5
1 2009-6-21 15
1 2009-6-22 7
1 2009-6-23 13
1 2009-12-20 3

When I run the script (1), an empty png image with only the x- and y-
axis are being created. My question is: by this information, can you
tell why the datapoints from the textfiles aren't being plotted?

Alex van der Spek

unread,
Apr 12, 2012, 11:49:02 AM4/12/12
to
Add as the last line in your script

set output

That flushes the buffer and closes the png file.


"Dennis" <dennis.s...@gmail.com> wrote in message
news:5e6d82a0-aa08-429f...@k14g2000vbe.googlegroups.com...
0 new messages