Re: Colorbar query. [message #7987] |
Tue, 28 January 1997 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
David Kennedy <D.Kennedy@qub.ac.uk> writes:
> I have been using the 'color bar' program from David Fanning's home page.
> The problem is that the routine labels the colour bar to the left.
> Which is daft as I have largish labels (eg 2.5E+19) and they cram up the
> diagram. I have been having difficulty changing the routine to label
> to the right. I can't find a (relatively easy) way to do this.
> I have seen many IDL plots labelled to the right and reckon there's
> a fairly obvious way to do this that I haven't stumbled across in the
> docs. Anyone any ideas?
>
> I have the code here:
>
> IF KEYWORD_SET(vertical) THEN BEGIN
>
> PLOT, [1,10], /NODATA, XTICKS=1, YTICKS=divisions, XSTYLE=1, YSTYLE=1, $
> POSITION=position, COLOR=color, CHARSIZE=charsize, /NOERASE, $
> YTICKFORMAT=format, XTICKFORMAT='(A1)', YTICKLEN=0.1 , $
> YRANGE=[min, max], YTITLE=title
Replace the code above with this:
IF KEYWORD_SET(vertical) THEN BEGIN
PLOT, [1,10], /NODATA, XTICKS=1, YTICKS=divisions, XSTYLE=1, YSTYLE=9, $
POSITION=position, COLOR=color, CHARSIZE=charsize, /NOERASE, $
YTICKFORMAT='(a1)', XTICKFORMAT='(A1)', YTICKLEN=0.1 , $
YRANGE=[min, max], YTITLE=title
AXIS, YAXIS=1, YRANGE=[min, max], YTICKFORMAT=format, YTICKS=divisions, $
YTICKLEN=0.1, YTITLE=title, YSTYLE=1
Now it's labelled on the right.
David I'm not trying to sell you anything, but you really ought to get
a copy of my book "IDL Programming". You will learn a *lot* about IDL
from that. You can order it from Floating Point Systems there in the
UK. I used the code from the book to make this change. I promise
that it will make a huge difference in your IDL programming! :-)
Cheers!
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
|
|
|