Jimmy wrote:
>> Hi Jimmy,
>>
>> if you are happy with linear scale for the x and y axis,
>> any of the numerous program to plot images with axes will
>> do, but if it matters to you to have log scales as in the
>> Ulysses plots, I suggest to use
>>
>> http://hea-www.cfa.harvard.edu/~pgrigis/idl_stuff/pg_plotima ge.pro
>>
>> Example of usage:
>>
>> pg_plotimage,dist(512,512),findgen(512),findgen(512)/10+1,/y log,/
>> xstyle,/ystyle
>>
>> Ciao,
>> Paolo
>
> Hi,
>
> Thanks for the advice! I will need to put log scales in, so that
> sounds like it'll be very useful.
>
> However (and this is my fault for not being clear) I'm not really at
> that stage yet- I'm still trying to convert a line spectral plot into
> a colour coded image, prior to plotting it. I basically have an array
> with a range of values in representing an 8 second piece of data, then
> a load of zeros, then another load of data, then zeros, etc... for an
> hour or so. When plotting this prints out as many, many spectra all in
> a line, and I'm trying to get idl to display them vertically and in
> color (as in the Ulysses plots).
>
> It may be that I need to write something to do this (I'm thinking
> something that bins the data accoring to its value, then assigns it a
> color based on intensity...) but as I've seen these plots around and
> the seem fairly standard I was hoping someone might know of function
> or program to do it for me- with my IDL skills it's likely to take a
> fair bit of time/cursing!
Hi, the format you describe seems a bit strange,
but assuming that your data really look like this,
this code should get you started (but please try
to understand every step of the code before you
try to apply something like that to your data).
IDL> a=[1,2,3,0,0,0,4,4,2,0,0,0,1,1,1,0,0,0,1,2,5]
IDL> ind=where(a NE 0)
IDL> b=reform(a[ind],3,4)
IDL> print,b
1 2 3
4 4 2
1 1 1
1 2 5
Ciao,
Paolo
>
> Thanks,
> Jimmy
|