comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » fill_plot
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
fill_plot [message #93000] Fri, 08 April 2016 04:36 Go to next message
rsori is currently offline  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 Go to previous messageGo to next message
Mats Löfdahl is currently offline  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)).
Re: fill_plot [message #93004 is a reply to message #93000] Fri, 08 April 2016 05:38 Go to previous message
rsori is currently offline  rsori
Messages: 5
Registered: November 2014
Junior Member
Thank you !!! yes yes I forgot to put data, I will try
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Can you please explain me the meaning of the following IDL code?
Next Topic: assigning integer and string value to same variable one by one

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:15:41 PDT 2025

Total time taken to generate the page: 0.00417 seconds