1

I am using gnuplot to try and plot several lines but each have different x ranges. I am running the following script:

# gnuplot script for 'omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat'
plot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:2 with lines title '1'
replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:3 with lines title '2'
replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:4 with lines title '3'
replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:5 with lines title '4'
replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:6 with lines title '5'
replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:7 with lines title '6'
replot "omarConf2EvONLY-vs-everyone-gta-lag-lpas-omarConf1-random-tag-tpas.dat" using 1:8 with lines title '7'

set terminal png size 800,600
set output "omar_vs_everyone-EVONLY.png"
replot

and the .dat file is just a file with columns such as:

1 0.5 0.5 0.1
2 0.6 1.3 0.8
3 0.7 0.32
4 0.7 0.35
5 1.3 4.32
6 1.67

notice that the columns have different lengths as each line has different x ranges.

The problem I have is that it plots funny as shown below: alt text http://img192.imageshack.us/img192/4686/gnuplotfail.png

2
  • This looks like a mistake in the data file, not in the plotting instructions. Commented Jun 11, 2010 at 14:16
  • what should the value be if nothing is to be plotted beyond that point Commented Jun 11, 2010 at 15:03

1 Answer 1

5

Ok Have found the answer:

must edit the dat file by placing in fullstops to pad out the data like so:

1 0.5 0.5 0.1
2 0.6 1.3 0.8
3 0.7 0.32 .
4 0.7 0.35 .
5 1.3 4.32 .
6 1.67  .  .
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.