| Re: suppression of time axis annotation [message #43980] |
Fri, 06 May 2005 16:34  |
R.G. Stockwell
Messages: 363 Registered: July 1999
|
Senior Member |
|
|
"R.G. Stockwell" <no@email.please> wrote in message
news:UESee.45$Q31.2751@news.uswest.net...
> this seems close, although one tick mark looks off :(
... snip
forgot to add....
if you want a nice gui appearance, you could call the original plot
to a pixmap or something, just to get the values of the tickmarks.
cheers,
bob
|
|
|
|
| Re: suppression of time axis annotation [message #43981 is a reply to message #43980] |
Fri, 06 May 2005 15:59   |
R.G. Stockwell
Messages: 363 Registered: July 1999
|
Senior Member |
|
|
"Ben Tupper" <btupper@bigelow.org> wrote in message
news:3e1v3mFpoabU1@individual.net...
...
> Hmmm.
>
> Thanks anyway,
> Ben
this seems close, although one tick mark looks off :(
-bob
n = 360
t = TIMEGEN(n, start = JULDAY(1,1,2005), STEP_SIZE = 7)
y1 = RandomN(seed, n)
y2 = RandomN(seed, n)
p1 = [0.1, 0.5, 0.9, 0.9]
p2 = [0.1, 0.1, 0.9, 0.5]
Window,0
v = 0
PLOT, t, y1, color=0,$
Title = "junk plot - "+ $
" ", $
POSITION = p1, $
XSTYLE = 1, $
XTICKUNITS = ['Months', 'Years'], $
XTICKINTERVAL = 4, $
XMINOR = 4,$
xticklen = .05,charsize = 0.001,xtick_Get=v
erase
PLOT, t, y1, $
Title = "Ticks matched i think - "+ $
"no annotation in middle", $
POSITION = p1, $
xminor=4,$
XSTYLE = 1, $
xtickname=blank_string(60),$
xticklen = .1,charsize = 1,$
xtick_Get=v2,$
xticks = n_elements(v)-1,$
xtickv=v
PLOT, t, y1, $
NOERASE = 1, $
POSITION = p2, $
XSTYLE = 1, $
XTICKUNITS = ['Months', 'Years'], $
XTICKINTERVAL = 4, $
XMINOR = 4
end
|
|
|
|
| Re: suppression of time axis annotation [message #43986 is a reply to message #43981] |
Fri, 06 May 2005 12:33   |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
R.G. Stockwell wrote:
> "David Fanning" <davidf@dfanning.com> wrote in message
> news:MPG.1ce52bfb5be9076c9899f4@news.frii.com...
>
> ...
>
>> Humm, this does what you want:
>>
>> Window,1
>> PLOT, t, y1, $
>> Title = "Ticks unmatched - " + $
>> "but annotation is suppressed in middle", $
>> POSITION = p1, $
>> XSTYLE = 1, $
>> XTICKINTERVAL = 4, $
>> XMINOR = 4
>> XTICKFORMAT='(A0)'
>> PLOT, t, y2, $
>> NOERASE = 1, $
>> POSITION = p2, $
>> XSTYLE = 1, $
>> XTICKUNITS = ['Months', 'Years'], $
>> XTICKINTERVAL = 4, $
>> XMINOR = 4
>>
>> But on my output it looks like someone has gone in there
>> with a magic marker and scribbled all over the left side
>> of the plot. Do you see that, too?
>>
>> Cheers,
>>
>> David
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>
>
>
> I see the scribbling too. It is the julian day number being printed out
> repeatedly
> over itself many times.
> Are you are missing a ",$" at the end of xminor=4 in the first plot?
> The xtickformat is not being set.
> However, that does not seem to make a difference.
>
> Back to the original question, suppressing tickmarks.
> You can set the length to be very small.
> xticklen = 0.001
> I don't know if that helps. But you can put it in your (Ben's) second
> example
> and the ugly unmatched tickmarks go away.
>
> As a guess, I think the tickmarks when using xtickunits=['month', 'year']
> are
> in units of months. (i.e. you are set to 4 months as xtickinterval].
> Perhaps that does not
> translate to days, since a month can have different days.
> If you drop the xtickunits name, and replace the xtickinterval with the
> appropriate
> days (i.e. xtickinterval = 4*30) it still does not line up.
>
Thanks Bob and David,
The XTICKLEN solution almost works - it just the enduser wants
tickmarks. Added to my woes is that I really want to stack three plots
or more. I though I could perhaps plot the bottom one first, get the
tickvalues (XTICK_GET) and the specify the tickvalues (XTICKV) but that
doesn't do it.
Hmmm.
Thanks anyway,
Ben
|
|
|
|
| Re: suppression of time axis annotation [message #43993 is a reply to message #43986] |
Fri, 06 May 2005 08:24   |
R.G. Stockwell
Messages: 363 Registered: July 1999
|
Senior Member |
|
|
"David Fanning" <davidf@dfanning.com> wrote in message
news:MPG.1ce52bfb5be9076c9899f4@news.frii.com...
>
...
> Humm, this does what you want:
>
> Window,1
> PLOT, t, y1, $
> Title = "Ticks unmatched - " + $
> "but annotation is suppressed in middle", $
> POSITION = p1, $
> XSTYLE = 1, $
> XTICKINTERVAL = 4, $
> XMINOR = 4
> XTICKFORMAT='(A0)'
> PLOT, t, y2, $
> NOERASE = 1, $
> POSITION = p2, $
> XSTYLE = 1, $
> XTICKUNITS = ['Months', 'Years'], $
> XTICKINTERVAL = 4, $
> XMINOR = 4
>
> But on my output it looks like someone has gone in there
> with a magic marker and scribbled all over the left side
> of the plot. Do you see that, too?
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
I see the scribbling too. It is the julian day number being printed out
repeatedly
over itself many times.
Are you are missing a ",$" at the end of xminor=4 in the first plot?
The xtickformat is not being set.
However, that does not seem to make a difference.
Back to the original question, suppressing tickmarks.
You can set the length to be very small.
xticklen = 0.001
I don't know if that helps. But you can put it in your (Ben's) second
example
and the ugly unmatched tickmarks go away.
As a guess, I think the tickmarks when using xtickunits=['month', 'year']
are
in units of months. (i.e. you are set to 4 months as xtickinterval].
Perhaps that does not
translate to days, since a month can have different days.
If you drop the xtickunits name, and replace the xtickinterval with the
appropriate
days (i.e. xtickinterval = 4*30) it still does not line up.
Cheers,
bob
|
|
|
|
| Re: suppression of time axis annotation [message #43995 is a reply to message #43993] |
Fri, 06 May 2005 07:24   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ben Tupper writes:
> I am trouble controlling axis annotations when I specify time based
> axes. Specifically, I am unable to suppress the time-based tickmarks
> by specifying the TICKNAME keyword. Does someone know a another method
> for suppressing tickmarks?
>
> I have pasted in a simple example below that shows the trouble. Inone
> window I get the tickintervals I desire but the annotationn I don't
> want. In the other I get the suppression I want, but not the tick interval.
Humm, this does what you want:
Window,1
PLOT, t, y1, $
Title = "Ticks unmatched - " + $
"but annotation is suppressed in middle", $
POSITION = p1, $
XSTYLE = 1, $
XTICKINTERVAL = 4, $
XMINOR = 4
XTICKFORMAT='(A0)'
PLOT, t, y2, $
NOERASE = 1, $
POSITION = p2, $
XSTYLE = 1, $
XTICKUNITS = ['Months', 'Years'], $
XTICKINTERVAL = 4, $
XMINOR = 4
But on my output it looks like someone has gone in there
with a magic marker and scribbled all over the left side
of the plot. Do you see that, too?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
|
|
|