Re: cgImage abscissa values in axis feature [message #88285 is a reply to message #88284] |
Mon, 07 April 2014 12:13   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Petros Syntelis writes:
> This solution
> for i=0,24 do cgimage, im,xv=x,yv=x,/axis, color='dodger blue'
> works like a charm, regardless of Device settings etc.
>
> About the retain:
> If i use:
> Device, Retain=0
> !p.multi=[0,5,5]
> for i=0,24 do cgImage, im, /Axes & !p.multi=0
> I get colors.
>
> If i use
> Device, Retain=2
> !p.multi=[0,5,5]
> for i=0,24 do cgImage, im, /Axes & !p.multi=0
> I get colors
>
> if i use
> Device, Retain=2
> cgDisplay
> !p.multi=[0,5,5]
> for i=0,24 do cgImage, im, /Axes & !p.multi=0
> I don't get colors, but i have the other "bug" the first 4 plots have black axes and the others have white..
> i get the same result if retain is set to 0, so i think that cgDisplay does some trick and solves the problem at some extent.
I think your X window manager is having trouble reading pixel
information from a graphics window. This is the the only thing that
makes any sense to me. Maybe its reading 4 bit per channel, or 16, or
who knows what, but something is wrong there.
I don't think cgDisplay does any "tricks". It opens an IDL graphics
window and erases it with a white color. Maybe the bug, whatever it is,
likes white windows more than black windows. I feel the same way. :-)
Oh!! You know what is happening here?
The axes, by default, set their color to "opposite". They read the pixel
in the upper-right corner of the window and then set the axis color to
the "opposite" of whatever color is displayed in that single pixel. I'll
bet one of your images is overwriting that pixel with a dark color,
which makes all subsequent image plots be drawn in a very light color.
Is this what is going on? Maybe you should set the MultiMargin keyword
cgImage to see if this works correctly if you don't completely fill up
the !P.Multi region.
for i=0,24 do cgImage, im, /Axes, multimargin=2
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.")
|
|
|