Pr0no
Pr0no

Reputation: 4099

gnuplot only plots axis, no data

I have the following script called campaigns.gp:

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

The data (text) files (campaing1.txt etc) are as follows:

1 2009-6-27 1
1 2009-6-20 2
1 2009-6-21 15
1 2009-6-22 6
1 2009-6-23 12
1 2009-12-20 1

When I run the script:

gnuplot> load campaingns.gp

an empty .png is created, see https://i.sstatic.net/8RlqT.jpg. My question is: why is there no data in the chart? What am I doing wrong? P.S. I'm using gnuplot on Windows.

Upvotes: 0

Views: 681

Answers (1)

mgilson
mgilson

Reputation: 309831

your problem is set size 12,12. This says to make the size of the plot 12 times bigger than normal in both the x and y directions.

Upvotes: 2

Related Questions