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

Home » Public Forums » archive » plot label help
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: plot label [message #48245 is a reply to message #10174] Tue, 04 April 2006 14:11 Go to previous messageGo to previous message
wgallery is currently offline  wgallery
Messages: 32
Registered: December 1998
Member
Steve.Morris@libero.it wrote:
> Hi guys!!
> I would like to make some plots, but only with certain number shown in
> the x and y axis. Is there any clever command to do that in IDL ??
>
> For example write only 3000, 3500, 4000, 4500 rather then
> 3100,3200,3300 etc ....
> Or, example, to write 3000 in bigger size, 3500 in smaller, 4000 in
> bigger on so on ...
>
> Thanks!
> S.

Try using a combination of xticks, xtickv and xtickname as in the
following example:

;;Program to demonstrate placing axis tick marks at specified values.
;;Plot a straight line from 0 to 1 with x-ticks at the following
locations:
values = [0, .3, .6, .9, 1.0]
n_int = 4 ;number of x intervals (not x values)

;;labels are what is actually printed at each tick mark
;;The '!d' and '!n' modifiers are positioning commands (in the IDL help
index, see
;;'positioning: commands'. The second and forth labels will be lowered.

labels = ['0', '!b0.3', '!n0.6', '!b0.9', '!n1.0']

plot, [0, 1], [0, 1], $
xticks = n_elements(labels)-1, $ ;number of tick intervals
xtickv = values, $ ;x-value of each tick mark
xtickname = labels ;text printed at each tick mark

end
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: plot label
Next Topic: IDLWave documentation generation

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

Current Time: Sun Oct 12 03:35:15 PDT 2025

Total time taken to generate the page: 0.48045 seconds