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

Home » Public Forums » archive » cgPlotS problem with NaN values in data
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: cgPlotS problem with NaN values in data [message #88963 is a reply to message #88960] Tue, 08 July 2014 13:39 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Morgan Silverman writes:

> I'm plotting latitude/longitude data on a map background using cgPlotS and keep getting the error message: % Program caused arithmetic error: Floating illegal operand when it gets to a NaN value in the data. Because I'm plotting this in a resizable graphics window it also brings up the keep command or delete command box each time, eventually crashing my session. Is there a way to get around this without removing the NaN values from my data? I haven't converted the
coordinates to metered space because when I did it plotted the lat/lon values in the wrong locations. I think because the data is taken from a model that was run on a map coordinate system maybe.

As you point out (somewhat ungraciously by blaming cgPlotS, I might
add), there is a problem when you try to do numbery things with things
that aren't, well, numbers. It's like adding (4 + "atrocious"). What in
the world do you end up with?

But, your problem is not that you can't plot the numbers. To plot the
numbers, you have to first convert them to projected meter space (the
purpose of the map coordinate object you are passing to cgPlotS). This
is the thing that is failing you, I believe.

I don't think you have any choice but to remove the incalculable points.
Where would you locate the darn things on the map otherwise?

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL in IPython notebooks
Next Topic: Projected Meter Space and mapCoord

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

Current Time: Wed Oct 08 15:48:15 PDT 2025

Total time taken to generate the page: 0.00209 seconds