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

Home » Public Forums » archive » xyouts and !p.multi , help!?!?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
xyouts and !p.multi , help!?!? [message #84890] Mon, 17 June 2013 07:19 Go to next message
anil is currently offline  anil
Messages: 34
Registered: August 2009
Member
Hi,
I'm trying to plot 4 map projections on a single page, with a common colorbar just below them. After this, I want to manually write some text on the page. I could not write anything anywhere on the page , no matter what i tried with XYOUTS. Plots work just fine but i can't write any text?!? Here is what i'm doing:

set_plot, 'ps'
device,/inches,/color
device, filename = '1.eps'
!p.multi=[0,2,2,0,0]
for k=0,numfiles-1 do begin
clevels=findgen(201)*(61./201.)-30
Map_Set, Limit=[40 ,27,48, 42],/advance,xmargin=[3,2],ymargin=[5,1]
Map_grid,/GRID, /labels, lats=[38,39,40,41,42,43,44,45,46,47,48],$
lons=[26,28,30,32,34,36,38,40,42],latnames=['','39','','41', '','43','','45','','47'],$
lonnames=['26','28','30','32','34','36','38','40','42'],/box _axes,charsize=0.5
Map_continents,/hires,/coasts,/rivers,/advance,/noerase
loadct,40,ncolors=202
contour,ssh(k,*,*),lon(k,*,*),lat(k,*,*),c_colors=indgen(201 )+1,$
Levels=clevels,/CELL_FILL,/Overplot;,/noerase
endfor
!p.multi=[0,1,1,0,0]
loadct,40,ncolors=202
;here comes the colorbar
b=clevels;findgen(201)*(q/200.)+y
r=size(b)
aa = dblarr(r(1),2)
aa = [[b], [b]]
cc = dblarr(1, 2)
cc = [0, 1]
cc=transpose(cc)
set_viewport, 0.1,0.9,0.05,0.09

contour,aa, b ,cc,/cell_fill, levels = b, /noer,$
ytickinterval = 1, ycharsize = 1, ys =4,xs = 1,charthick=1,charsize=1.0 ,$
c_colors=indgen(200)+1

;here is what i can't figure out:
xyouts..... ??!?!
close,/all
end

Why can't i just write with xyouts,0.5,0.5,'text' ?
Is it because of !p.multi? I also set !p.multi=0 before xyouts ,that does not work either? Please help.
Thanks,
anil
Re: xyouts and !p.multi , help!?!? [message #84892 is a reply to message #84890] Mon, 17 June 2013 07:24 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
anil writes:

> Why can't i just write with xyouts,0.5,0.5,'text' ?
> Is it because of !p.multi? I also set !p.multi=0 before xyouts ,that does not work either?

Add a NORMAL keyword to this command. :-)

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.")
Re: xyouts and !p.multi , help!?!? [message #84893 is a reply to message #84892] Mon, 17 June 2013 07:30 Go to previous messageGo to next message
anil is currently offline  anil
Messages: 34
Registered: August 2009
Member
On Monday, June 17, 2013 5:24:17 PM UTC+3, David Fanning wrote:
> anil writes:
>
>
>
>> Why can't i just write with xyouts,0.5,0.5,'text' ?
>
>> Is it because of !p.multi? I also set !p.multi=0 before xyouts ,that does not work either?
>
>
>
> Add a NORMAL keyword to this command. :-)
>
>
>
> 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.")

David, Thank you for your quick reply. I also tried /normal , but that does not work either. I could not understand why? can it be the set_viewport?
Re: xyouts and !p.multi , help!?!? [message #84896 is a reply to message #84893] Mon, 17 June 2013 07:45 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
anil writes:

> David, Thank you for your quick reply. I also tried /normal , but that does not work either. I could not understand why? can it be the set_viewport?

Set_Viewport!? Yes, that could screw things up pretty good. But, you
should see something when you use normalized coordinates. Try writing
the text in a red color. Maybe you are drawing white on white. That's
hard to see. ;-)

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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Get directory list from HTTP Server
Next Topic: SVN plugin fix for IDL 8.2.3

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

Current Time: Wed Oct 08 15:32:55 PDT 2025

Total time taken to generate the page: 0.00579 seconds