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

Home » Public Forums » archive » Overplot grid
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: Overplot grid [message #86431 is a reply to message #86429] Thu, 07 November 2013 11:35 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

>
> Jordan Guerra writes:
>
>> Let us say I have an image and I divide that image in a 100x100 square
> pieces of the same size. How can I overplot a a grid to this image in
> which I highlight an specific subfield? I mean, if I have some other
> plot that I calculated from the subfield (X,Y) and I want to be able to
> locale and frame that and only that location in the whole image, so I
> can see any particular feature within this rectangle.
>>
>> Any idea?
>
> Here is a grid cell overlayed with a gray-scale transparency to call
> attention to it. You can change the value of the Transparent keyword
> to make it more or less prominent:
>
> image = Congrid(cgDemoData(18), 50, 50)
> cgDisplay, 500, 500
> cgLoadCT, 4, /Brewer, /Reverse
> cgImage, image, XRange=[0,10], YRange=[0,10], /Save
> FOR j=1,9 DO cgPlotS, [0,10], [j,j], Color='Navy'
> FOR j=1,9 DO cgPlotS, [j,j], [0,10], Color='Navy'
> cgImage, image[35:39,25:29], XRange=[7,8], YRange=[5,6], /Overplot, $
> Transparent=25, CTIndex=0
> END

Maybe this is easier to see what we are doing:

image = Congrid(cgDemoData(13), 500, 500)
cgDisplay, 500, 500
cgLoadCT, 0
cgImage, image, XRange=[0,10], YRange=[0,10], /Save
FOR j=1,9 DO cgPlotS, [0,10], [j,j], Color='Khaki'
FOR j=1,9 DO cgPlotS, [j,j], [0,10], Color='Khaki'
cgImage, image[350:399,250:299], XRange=[7,8], YRange=[5,6],$
/Overplot, Transparent=70, CTIndex=33
END

--
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
Previous Topic: Non-blocking socket
Next Topic: Re: Non-blocking socket

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

Current Time: Sun Oct 12 13:13:17 PDT 2025

Total time taken to generate the page: 0.40218 seconds