Re: Contour Plot w/ Colorbar [message #74713] |
Tue, 01 February 2011 09:26  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ammar Yusuf writes:
> Also you mentioned something about normalized coordinates in your next
> post. Is there another type of positioning?
Not really, no.
I would do something like this:
data = LoadData(2)
CTLoad, 33
FSC_Contour, data, NLevels=12, /FILL, $
Position=[0.1, 0.1, 0.82, 0.9], /Window
FSC_Contour, data, /Overplot, Color='gray', /AddCmd
FSC_Colorbar, /Vertical, /Right, Divisions=5, $
Range=[Min(data),Max(data)], $
Position=[0.85, 0.1, 0.89, 0.9], /AddCmd
Then, just choose the Send to PostScript button and
your PostScript output will look identical to what
you see on the display. :-)
You can find all the Coyote Library files you need
here:
http://www.idlcoyote.com/programs/coyoteprograms.zip
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Contour Plot w/ Colorbar [message #74715 is a reply to message #74713] |
Tue, 01 February 2011 09:02   |
Ammar Yusuf
Messages: 36 Registered: October 2010
|
Member |
|
|
On Feb 1, 10:40 am, David Fanning <n...@dfanning.com> wrote:
> Ammar Yusuf writes:
>> Yea I tried changing the position but then it's starting to make the
>> colorbar really thin and I still couldn't get all the numbers inside.
>> Is there anyway to increase the box or something that it plots the
>> postscript file to?
>
> Why don't you try moving the contour plot to the left,
> so you have more room for the colorbar? Move *everything*
> to the left!
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Yea I'm not sure how I would do that. I'm assuming positioning but not
sure exactly what to position. I have this code now:
contour, data, x, y, max_value = max_bright, min_value = min_bright, $
/Fill, C_Colors = indgen(levels), background = 1, xstyle = 4, $
ystyle = 4, levels = userLevels, /normal, color = black, $
Position = [0.001, 0.1, 0.75, 0.80]
colorBar, NColors=levels, divisions=6, Range = [min_data, max_data], $
format='(I5)', Position = [0.80, 0.10, 0.81, 0.90], Color = black,
$
/vertical, /right
The contour image looks a little distorted and I got the color bar in
the box with numbers but it's really thin.
Also you mentioned something about normalized coordinates in your next
post. Is there another type of positioning?
Thanks.
|
|
|
|
|
|
|
Re: Contour Plot w/ Colorbar [message #74800 is a reply to message #74713] |
Tue, 01 February 2011 16:31  |
Ammar Yusuf
Messages: 36 Registered: October 2010
|
Member |
|
|
On Feb 1, 12:26 pm, David Fanning <n...@dfanning.com> wrote:
> Ammar Yusuf writes:
>> Also you mentioned something about normalized coordinates in your next
>> post. Is there another type of positioning?
>
> Not really, no.
>
> I would do something like this:
>
> data = LoadData(2)
> CTLoad, 33
> FSC_Contour, data, NLevels=12, /FILL, $
> Position=[0.1, 0.1, 0.82, 0.9], /Window
> FSC_Contour, data, /Overplot, Color='gray', /AddCmd
> FSC_Colorbar, /Vertical, /Right, Divisions=5, $
> Range=[Min(data),Max(data)], $
> Position=[0.85, 0.1, 0.89, 0.9], /AddCmd
>
> Then, just choose the Send to PostScript button and
> your PostScript output will look identical to what
> you see on the display. :-)
>
> You can find all the Coyote Library files you need
> here:
>
> http://www.idlcoyote.com/programs/coyoteprograms.zip
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Hi David,
I did that but I got this error: http://i.imgur.com/6R6Mr.png.
Then what happened after I clicked okay was it started opening up
windows continuously on taskbar and it would not stop.
It just kept going and I had to hit stop through IDL but even that
took a while and made my computer go very slow.
I was just wondering if this is a bug that I encountered. I did
download your library 2 days ago but I know you're making
updates. Thanks!
|
|
|