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

Home » Public Forums » archive » Can't suppress 0 on AXIS call
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: Can't suppress 0 on AXIS call [message #87079 is a reply to message #87078] Mon, 06 January 2014 05:57 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
OM writes:

>
> Here is a typical plotting code for one of the plots to the left of the first one (this is of course all done using !p.multi; the first object of the xtickname array is a blank space):
>
> LEFT=0.35
> RIGHT=0.65
> BOTTOM=0.3
> TOP=0.9
>
> cgplot, t[w],ymm[3,w],/ylog,thick=7,linestyle=4,color=192,xstyle=9,x range=[0,14],ystyle=1,yrange=[1.e-4,2.e-2],charsize=sh,chart hick=ch,xtickformat= "(A1)",ytickformat="(A1)",pos=[LEFT,BOTTOM,RIGHT,TOP]
>
> for i=0,2 do cgoplot, t[w],ymm[i,w],thick=7,linestyle=i+1,color=col[i]
>
> axis,xaxis=1,xrange=[0,14],xstyle=1,xtickv=ts,xtickname=[' ',string(rss[1],format='(D0.1)'),strtrim(string(rss[2:6],for mat='(I)'),2)],xticks=8,charsize=sh,charthick=ch

Well, it is a grave mistake to use !P.MULTI and the POSITION keyword at
the at the same time, but I doubt that has much to do with the
particular problem we are trying to solve here.

Trying to duplicate your code as much as possible, I find that this
works perfectly:

cgPlot, cgdemodata(1), xstyle=9, ystyle=8, $
position=[0.1, 0.1, 0.5, 0.9], $
xrange=[0,14], xtickformat='(A1)', ytickformat='(A1)'
xnames = StrTrim(SIndGen(8)*2,2)
xnames[7] = ' '
cgAxis, XAXIS=1, XTickName=xnames, xstyle=1
cgPlot, cgdemodata(1), xstyle=9, ystyle=8, $
position=[0.5, 0.1, 0.9, 0.9], /NoErase, $
xrange=[0,14], xtickformat='(A1)', ytickformat='(A1)'
cgAxis, XAXIS=1, xstyle=1

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: closed contour paths: clockwise or anticlockwise - or actually a mixture?
Next Topic: Axis Labels

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

Current Time: Fri Oct 10 01:26:46 PDT 2025

Total time taken to generate the page: 0.08080 seconds