On May 24, 4:00 pm, David Fanning <n...@dfanning.com> wrote:
> Gray writes:
>> So, I looked at TVIMAGE more closely and realized that passing x/
>> ystyle=9 with the /AXES keyword (and others) works exactly the way I
>> want. However, I'm still having an issue with the color thing. I
>> have IDL 7.0, so I can't set decomposed=1 for a postscript device, and
>> TVIMAGE doesn't let me pass {true:1} as _extra, because it requires a
>> 3D array. Any suggestions besides updating IDL to 7.1 (which I'll do
>> if it's my only option)?
>
> Well, if I load the colors I want to use *just before
> I want to use them*, I have never had any trouble getting
> the colors I wanted. Are you doing something other than
> this?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Okay, still not working, but in a different way. I tried to do this
systematically, doing a .RESET to clear everything. Here's my code
(using random x and y values for the overplot):
set_plot, 'ps'
img = readfits('myimage.fits')
img_sz = size(img,/dim)
keywords = psconfig(/nogui,/encapsul,/color,/inches,xsize=6,$
ysize=6.*img_sz[0]/img_sz[1],filename='myimage.eps')
device, _extra=keywords
tvimage, img, /axes, axkey={xstyle:9,ystyle:9}, $
xra=[0,img_sz[0]-1], yra=[0,img_sz[1]-1]
x = randomu(seed,100)*(img_sz[0]-1)
y = randomu(seed,100)*(img_sz[1]-1)
loadct, 13, /silent
oplot, x, y, psym=4, color=fsc_color('green')
oplot, x+1,y+1,psym=1, color=fsc_color('red')
oplot, x-1,y-1,psym=6, color=fsc_color('yellow')
device, /close
set_plot, 'x'
When I do this, I have two problems: 1) my points (if they overplot
at all, I'm not 100% convinced) are in greyscale, even though I loaded
a new color table, and 2) I've now realized that even passing those
xstyle keywords don't suppress the axis. It's subtle, because it's
black against the border of a complicated greyscale image, but it's
there.
|