fill_plot [message #93000] |
Fri, 08 April 2016 04:36  |
rsori
Messages: 5 Registered: November 2014
|
Junior Member |
|
|
Hi
I plot a vector with the data i need, for example example:
data=findgen(18) ; are negative and positive values
openr,1,'G:\datos.dat'
readf,1,data
close,1
cgplot,
How could I shade with blue the data under x axis and red the positive values above x ???
I was reading to use polyfill but always use two dimensions, vectors x and y...
Thank you !!!
|
|
|
Re: fill_plot [message #93001 is a reply to message #93000] |
Fri, 08 April 2016 05:20   |
Mats Löfdahl
Messages: 263 Registered: January 2012
|
Senior Member |
|
|
Den fredag 8 april 2016 kl. 13:36:55 UTC+2 skrev Rogert:
> Hi
>
> I plot a vector with the data i need, for example example:
>
> data=findgen(18) ; are negative and positive values
>
> openr,1,'G:\datos.dat'
> readf,1,data
> close,1
>
> cgplot,
>
> How could I shade with blue the data under x axis and red the positive values above x ???
>
> I was reading to use polyfill but always use two dimensions, vectors x and y...
>
> Thank you !!!
Your gcplot command is incomplete but if you do
cgplot, data
then data is your y and your x is indgen(n_elements(data)).
|
|
|
|