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

Home » Public Forums » archive » Keep getting a transparent background on a composite image
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: Keep getting a transparent background on a composite image [message #90741 is a reply to message #90736] Wed, 08 April 2015 16:35 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
simulana@gmail.com writes:

> Yet another puzzler. I would like a white background instead of transparent, but I can't quite figure out to get it. Further mystery - cgImage plots have a white background, but the cgcolorbar part does not. Is it something in my device command? Is it because I set my own color table? All I know from other forums is that I apparently have something that other people want, but I don't want.
>
> For brevity, I won't post the whole code with all 9 images:
> set_plot,'ps'
> r = Interpol([ 255, 0, 0, 0,255,234,107,0], [0, 36, 73,110,147,184,220,255], Findgen(256))
> g = Interpol([ 255, 0,255,126,255, 82, 0,0], [0, 36, 73,110,147,184,220,255], Findgen(256))
> b = Interpol([ 255,91,255, 0, 0, 0, 0,0], [0, 36, 73,110,147,184,220,255], Findgen(256))
> TVLCT, r, g, b
> device,filename='2damr1-3_paper.eps',/color,bits=8,/encaps,x size=xsizecm,ysize=ysizecm,decomposed=0
> cgimage, image(0,*,*), /DEVICE, /SCALE,/AXES ,$
> position=position1,$
> xrange=[-6.25,6.25],yrange=[-8.545,8.545],ytitle='[pc]',$
> color='black',charsize=4,/KEEP_ASPECT_RATIO,$
> AXKEYWORDS={CHARTHICK:10,xthick:5,ythick:5,xtickformat:'(A1) '},/noerase
> cgimage, image(1,*,*), /DEVICE, /SCALE,/AXES ,$
> position=position2,xrange=[-6.25,6.25],yrange=[-8.545,8.545] ,$
> color='black',charsize=4,/KEEP_ASPECT_RATIO,$
> AXKEYWORDS={CHARTHICK:10,xthick:5,ythick:5,ytickformat:'(A1) ',xtickformat:'(A1)'},/noerase
> cgimage, image(2,*,*), /DEVICE, /SCALE,/AXES ,$
> position=position3,xrange=[-6.25,6.25],yrange=[-8.545,8.545] ,$
> color='black',charsize=4,/KEEP_ASPECT_RATIO,$
> AXKEYWORDS={CHARTHICK:10,xthick:5,ythick:5,ytickformat:'(A1) ',xtickformat:'(A1)'},/noerase
>
> ticks=loglevels([30,4000],/Fine)
> nticks = n_elements(ticks)
> cgColorbar,Range=[30,4000],Title='Density (cm!e-3!n)',Position=[0.87, 0.2, 0.90, 0.8],$
> /ylog,/vertical,yticks=nticks-1,ytickv=ticks,charsize=5,char thick=13,/right

I can't really figure out what question you are asking. But, it is
probably a mistake to use both the POSITION keyword and the
KEEP_ASPECT_RATIO keyword on the same cgImage 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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: CXFORM on WinXP
Next Topic: MPFITFUN error -- only reading the first data value

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

Current Time: Wed Oct 08 13:54:53 PDT 2025

Total time taken to generate the page: 0.00644 seconds