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

Home » Public Forums » archive » Re: Plot and Plots
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Plot and Plots [message #58435] Fri, 01 February 2008 06:21
Paul.Bowyer@gmail.com is currently offline  Paul.Bowyer@gmail.com
Messages: 7
Registered: September 2007
Junior Member
On Feb 1, 1:29 pm, David Fanning <n...@dfanning.com> wrote:
> pb24 writes:
>> Plot does work with PLOTS, the problem was that I was passing PLOTS an
>> X and Y scalar rather than a vector!! My mistake, as usual!
>> One thing I dont seem to be able to get rid of though, is an annoying
>> diagonal line running from top-right to bottom-left on the graphic
>> produced, I have the axes suppressed but can't suppress the diagonal
>> line. I'm toiling with plotting and colours in IDL having previously
>> avoided it, but thanks to your articles have been able to make some
>> sense of it, any idea how to get rid of this line, also, label font
>> colors on a graticule or plot title seem a mystery to me, any
>> pointers?? I could send an example output if this would make my
>> postings clearer and less long winded!
>
> Try adding the NODATA keyword to your PLOT command.
>
> 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.")

Magic!
Thanks again,
Paul
Re: Plot and Plots [message #58437 is a reply to message #58435] Fri, 01 February 2008 05:29 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pb24 writes:

> Plot does work with PLOTS, the problem was that I was passing PLOTS an
> X and Y scalar rather than a vector!! My mistake, as usual!
> One thing I dont seem to be able to get rid of though, is an annoying
> diagonal line running from top-right to bottom-left on the graphic
> produced, I have the axes suppressed but can't suppress the diagonal
> line. I'm toiling with plotting and colours in IDL having previously
> avoided it, but thanks to your articles have been able to make some
> sense of it, any idea how to get rid of this line, also, label font
> colors on a graticule or plot title seem a mystery to me, any
> pointers?? I could send an example output if this would make my
> postings clearer and less long winded!

Try adding the NODATA keyword to your PLOT command.

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.")
Re: Plot and Plots [message #58440 is a reply to message #58437] Fri, 01 February 2008 03:08 Go to previous message
Paul.Bowyer@gmail.com is currently offline  Paul.Bowyer@gmail.com
Messages: 7
Registered: September 2007
Junior Member
On Jan 31, 10:22 pm, David Fanning <n...@dfanning.com> wrote:
> pb24 writes:
>> I have no trouble displaying the graticule and the continents using
>> MAP_GRID,and MAP_CONTINENTS. The problem is that once I have these
>> displayed, I'd like to plot the satellite image footprint on top by
>> taking the four image corner coordinates and using PLOTS. I have done
>> this using PLOTS when used in combination with MAP_SET (and with a
>> stereographic projection), but I want ideally, to have a *polar
>> stereographic* projection (they are not the same sadly - map
>> projections!!). That is why I am having to use MAP_PROJ_INIT with 106
>> projection number a GCTP type. Hope that makes my initial post a
>> little clearer.
>
> Yeah, sorry, I should have used 106 in my example,
> but after consulting with the map projection experts
> around here, we are at a loss as to how a polar stereographic
> projection is any different from a stereographic
> projection, centered on a pole. :-)
>
> If you were successful plotting your image footprint
> using MAP_SET, I would guess the values are in lat/lon
> space. If you want to do the same thing with a GCTP
> projection (and you *always* do, forget you ever heard
> about MAP_SET, is my advice), you will need to transform
> the image values into UV space (with MAP_PROJ_FORWARD) and
> set up the UV coordinate space as I explained in the
> previous post.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Hi David,

Plot does work with PLOTS, the problem was that I was passing PLOTS an
X and Y scalar rather than a vector!! My mistake, as usual!
One thing I dont seem to be able to get rid of though, is an annoying
diagonal line running from top-right to bottom-left on the graphic
produced, I have the axes suppressed but can't suppress the diagonal
line. I'm toiling with plotting and colours in IDL having previously
avoided it, but thanks to your articles have been able to make some
sense of it, any idea how to get rid of this line, also, label font
colors on a graticule or plot title seem a mystery to me, any
pointers?? I could send an example output if this would make my
postings clearer and less long winded!

Thanks,
Paul
Re: Plot and Plots [message #58453 is a reply to message #58440] Thu, 31 January 2008 14:22 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pb24 writes:

> I have no trouble displaying the graticule and the continents using
> MAP_GRID,and MAP_CONTINENTS. The problem is that once I have these
> displayed, I'd like to plot the satellite image footprint on top by
> taking the four image corner coordinates and using PLOTS. I have done
> this using PLOTS when used in combination with MAP_SET (and with a
> stereographic projection), but I want ideally, to have a *polar
> stereographic* projection (they are not the same sadly - map
> projections!!). That is why I am having to use MAP_PROJ_INIT with 106
> projection number a GCTP type. Hope that makes my initial post a
> little clearer.

Yeah, sorry, I should have used 106 in my example,
but after consulting with the map projection experts
around here, we are at a loss as to how a polar stereographic
projection is any different from a stereographic
projection, centered on a pole. :-)

If you were successful plotting your image footprint
using MAP_SET, I would guess the values are in lat/lon
space. If you want to do the same thing with a GCTP
projection (and you *always* do, forget you ever heard
about MAP_SET, is my advice), you will need to transform
the image values into UV space (with MAP_PROJ_FORWARD) and
set up the UV coordinate space as I explained in the
previous post.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Plot and Plots [message #58454 is a reply to message #58453] Thu, 31 January 2008 13:53 Go to previous message
Paul.Bowyer@gmail.com is currently offline  Paul.Bowyer@gmail.com
Messages: 7
Registered: September 2007
Junior Member
On Jan 31, 7:27 pm, David Fanning <n...@dfanning.com> wrote:
> pb24 writes:
>> I am trying to produce a graphic showing continent outlines,
>> coastlines etc, with a graticule and the footprint of a satellite
>> image. I can do all this by using MAP_SET, and then I use PLOTS to
>> plot a vector of the image coordinates. Using MAP_SET however, I can
>> only specify a STEREOGRAPHIC projection, when I want a POLAR
>> STEREOGRAPHIC projection.
>
>> To get a POLAR STEREOGRAPHIC projection I need to use MAP_PROJ_INIT
>> and then PLOT to display the graticule. However when I do this I cant
>> seem to get PLOTS to display the image footprint. I have converted my
>> image footprint coordinates from lat./long. to cartesian using
>> MAP_PROJ_FORWARD, but using PLOTS just doesnt work. Any ideas from
>> anyone would be gratefully received. Is it not possible to use PLOT
>> and PLOTS together??
>
> I suspect the problem is the way you are using PLOT to set
> up your UV data coordinate space. The code will look something
> like this:
>
> polar = Map_Proj_Init(1, CENTER_LAT=90, CENTER_LON=0)
> uvgraticule = Map_Proj_Forward(graticule, MAP_STRUCTURE=polar)
> uv_box = polar.uv_box
> Plot, uv_box[[0, 2]], uv_box[[1, 3]], Position=[0.1,0.1,0.9,0.9], $
> /Nodata, XStyle=5, YStyle=5, /NoErase
> Oplot, uvgraticule ; Or MAP_grid, MAP_STRUCT=polar, /LABEL, etc.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Hi David,

Thanks for your reply.
I have no trouble displaying the graticule and the continents using
MAP_GRID,and MAP_CONTINENTS. The problem is that once I have these
displayed, I'd like to plot the satellite image footprint on top by
taking the four image corner coordinates and using PLOTS. I have done
this using PLOTS when used in combination with MAP_SET (and with a
stereographic projection), but I want ideally, to have a *polar
stereographic* projection (they are not the same sadly - map
projections!!). That is why I am having to use MAP_PROJ_INIT with 106
projection number a GCTP type. Hope that makes my initial post a
little clearer.
Thanks again,
Paul
Re: Plot and Plots [message #58459 is a reply to message #58454] Thu, 31 January 2008 11:27 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pb24 writes:

> I am trying to produce a graphic showing continent outlines,
> coastlines etc, with a graticule and the footprint of a satellite
> image. I can do all this by using MAP_SET, and then I use PLOTS to
> plot a vector of the image coordinates. Using MAP_SET however, I can
> only specify a STEREOGRAPHIC projection, when I want a POLAR
> STEREOGRAPHIC projection.
>
> To get a POLAR STEREOGRAPHIC projection I need to use MAP_PROJ_INIT
> and then PLOT to display the graticule. However when I do this I cant
> seem to get PLOTS to display the image footprint. I have converted my
> image footprint coordinates from lat./long. to cartesian using
> MAP_PROJ_FORWARD, but using PLOTS just doesnt work. Any ideas from
> anyone would be gratefully received. Is it not possible to use PLOT
> and PLOTS together??

I suspect the problem is the way you are using PLOT to set
up your UV data coordinate space. The code will look something
like this:

polar = Map_Proj_Init(1, CENTER_LAT=90, CENTER_LON=0)
uvgraticule = Map_Proj_Forward(graticule, MAP_STRUCTURE=polar)
uv_box = polar.uv_box
Plot, uv_box[[0, 2]], uv_box[[1, 3]], Position=[0.1,0.1,0.9,0.9], $
/Nodata, XStyle=5, YStyle=5, /NoErase
Oplot, uvgraticule ; Or MAP_grid, MAP_STRUCT=polar, /LABEL, etc.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Creating a dicom-file in HSV colors
Next Topic: window size

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

Current Time: Fri Oct 10 08:18:19 PDT 2025

Total time taken to generate the page: 0.40358 seconds