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

Home » Public Forums » archive » Having trouble with code for data to 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: Having trouble with code for data to image. [message #64095 is a reply to message #63985] Wed, 26 November 2008 15:58 Go to previous messageGo to previous message
mbweller is currently offline  mbweller
Messages: 24
Registered: July 2008
Junior Member
On Nov 26, 3:08 pm, David Fanning <n...@dfanning.com> wrote:
> mbwel...@gmail.com writes:
>> My image is of the western hemisphere of Mars, so lat range is -90 to
>> 90 and lon range =3D -180 to 0 degrees. I would like to present it as a
>> Hemisphere display since that makes the most sense to do.
>
> You can try something like this:
>
>    image = BytScl(Dist(400), TOP=254)
>    CTLoad, 4, /Brewer, NCOLORS=254
>    TVLCT, FSC_Color('ivory', /TRIPLE), 255
>    Window, XSIZE=400, YSIZE=400
>    Erase, Color=FSC_Color('ivory')
>    Map_Set, /Orthographic, 0, -90, $
>         Position=[0.1, 0.1, 0.9, 0.9], /NOERASE
>    warp = Map_Image(image, xs, ys, COMPRESS=1, $
>         LATMIN=-90, LATMAX=90, LONMIN=-180, LONMAX=0, $
>         MISSING=255)
>    TVIMAGE, warp, Position=[0.1, 0.1, 0.9, 0.9]
>    XYOuts, 0.5, 0.055, /NORMAL, '-90', $
>         COLOR=FSC_Color('charcoal'), ALIGN=0.5
>    XYOuts, 0.5, 0.915, /NORMAL, '90', $
>         COLOR=FSC_Color('charcoal'), ALIGN=0.5
>    XYOuts, 0.09, 0.5, /NORMAL, '-180', $
>         COLOR=FSC_Color('charcoal'), ALIGN=1.0
>    XYOuts, 0.915, 0.5, /NORMAL, '0', $
>         COLOR=FSC_Color('charcoal'), ALIGN=0.5
>    END
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

That works perfectly. Thank you!

These are the last two questions, I swear ;) , I'm just incredibly
productive right now and want to get it out of the way before the
holiday weekend.

How could one leave enough empty window space in order to place the
color bar in such a way as to not be placed onto the image? Currently,
since the image is displayed in the entirety of the image window, I
have to manually increase the window size in order to place it.

And finally,
I'm trying to save the image. I've used:
write_jpeg,'EXTENSIONAL STRAIN general.jpeg', tvrd()
but is saves it gray scale and I have tried saving it as a postscript:
SET_PLOT, 'PS'
DEVICE, FILENAME='estrain.ps'
PLOT, image_e
$ lpr estrain.ps
and it gives my what appears to be a histogram analysis and the
spheroid from which it came.

I need the highest quality color image possible (It'll be on a poster
and the image will be around a ft in size.)

Thanks again, I was running out of time.

~Matt
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Memory allocation problem
Next Topic: Re: inverse gradient

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

Current Time: Tue Dec 02 02:23:49 PST 2025

Total time taken to generate the page: 1.03938 seconds