Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > Gnuplot interactive function plotter > Changing the ra...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 3378 of 3499
Post > Topic >>

Changing the range for part of a plot

by philkime <Philip@[EMAIL PROTECTED] > Jun 24, 2008 at 12:30 PM

I wanted to change the linecolour for half of the datapoints in a
column of data but I can't work out if this is possible?

If the line data is in one column like this (using comma as delimiter)
(first two columns are histogram):

"xlabel1",45,10
"xlabel2",67,10

I suppose I'd need to do something like this:

plot "file.csv" using 2:xticlabels(1) linecolor rgb 'blue' title
"Response Time",\
       [0:50] '' using 0:3 with lines linewidth 3 linecolor rgb 'red'
title "Median Response Time (points 1-50)",\
       [51:100] '' using 0:3 with lines linewidth 3 linecolor rgb
'green' title "Median Response Time (points 51-100)"

but of course this is all illegal syntax because ranges apply to the
whole plot and have to be the first argument to plot. Also, I don't
know how to start the x coord at anything other than 0 and have it
autoincrement as with the special "0" value.

I ended up having to split the median column into two columns like
this:

"xlabel1",45,10,
"xlabel2",45,10,
..
..
..
"xlabel50",45,10,
"xlabel51",67,,10
..
..
..

and then plot with

plot "file.csv" using 2:xticlabels(1) linecolor rgb 'blue' title
"Response Time",\
     '' using 0:3 with lines linewidth 3 linecolor rgb 'red' title
"Median Response Time (points 1-50)",\
     '' using 0:4 with lines linewidth 3 linecolor rgb 'green' title
"Median Response Time (points 51-100)"


Any ideas on how I could do this without messing about with the data
file? I can't use separate plot commands as of course that just
overwrites the previous plot. And multiplot doesn't work because the
first part of the plot is a histogram with words as xticlabels so the
second multiplot doesn't line up at all with the first one.
 




 5 Posts in Topic:
Changing the range for part of a plot
philkime <Philip@[EMAI  2008-06-24 12:30:28 
Re: Changing the range for part of a plot
merritt@[EMAIL PROTECTED]  2008-06-24 13:00:34 
Re: Changing the range for part of a plot
philkime <Philip@[EMAI  2008-06-24 14:27:19 
Re: Changing the range for part of a plot
googoff@[EMAIL PROTECTED]  2008-06-25 04:21:38 
Re: Changing the range for part of a plot
philkime <Philip@[EMAI  2008-06-27 20:08:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 11:16:02 CDT 2008.