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

Home » Public Forums » archive » Re: bug in contour?
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: bug in contour? [message #27280] Wed, 17 October 2001 08:09 Go to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Jacques <jfb37@NOSPAM.cam.ac.uk> writes:

> Hi all
>
> Has anyone else run into a problem with the zlog keyword in contour? Or
> can someone tell me where I am going wrong? It seems that if the keyword
> is set, then any further contour plots are plotted using a log scale
> irrespective of what value is sent to zlog. A way around it is to set
> !z.type to 0 after each call to contour, but that shouldn't be the way
> to do it.
>
> There is some simple code below to illustrate the point.
... removed code ...

I am not sure this is a bug. It is similar to the behavior of other
/XLOG, /YLOG keywords, in the sense that once they are set, then any
overplots are also performed in logarithmic coordinates. Since XLOG
and YLOG are "sticky," I could see why ZLOG might be too. I will
grant that the ZLOG behavior is a bit surprising at first approach.

The simple solution is to compute the logarithm yourself. I.e.,

contour, ALOG10(dist(50))

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: bug in contour? [message #27285 is a reply to message #27280] Wed, 17 October 2001 04:38 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Jacques wrote:
>
> Hi all
>
> Has anyone else run into a problem with the zlog keyword in contour? Or
> can someone tell me where I am going wrong? It seems that if the keyword
> is set, then any further contour plots are plotted using a log scale
> irrespective of what value is sent to zlog. A way around it is to set
> !z.type to 0 after each call to contour, but that shouldn't be the way
> to do it.
>
> There is some simple code below to illustrate the point.
>
> Thanks
> Jacques
>
> IDL Version 5.4 (linux x86). (c) 2000, Research Systems, Inc.
>
> IDL> contour, dist(50)
> IDL> contour, dist(50), /zlog
> % CONTOUR: Warning: Infinite plot range.
> IDL> contour, dist(50)
> % CONTOUR: Warning: Infinite plot range.
> IDL> contour, dist(50), zlog=0
> % CONTOUR: Warning: Infinite plot range.
> IDL> !z.type=0
> IDL> contour, dist(50)
> IDL> contour, dist(50), zlog=0

IDL5.4.1 has the same bug but idl5.5beta2 is ok.

regards
Reimar



--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml

http://www.fz-juelich.de/zb/text/publikation/juel3786.html
============================================================ ======

read something about linux / windows
http://www.suse.de/de/news/hotnews/MS.html
Re: bug in contour? [message #27355 is a reply to message #27280] Thu, 18 October 2001 01:06 Go to previous message
Jacques is currently offline  Jacques
Messages: 5
Registered: September 1994
Junior Member
Craig Markwardt wrote:

> Jacques <jfb37@NOSPAM.cam.ac.uk> writes:
>
>
>> Hi all
>>
>> Has anyone else run into a problem with the zlog keyword in contour? Or
>> can someone tell me where I am going wrong? It seems that if the keyword
>> is set, then any further contour plots are plotted using a log scale
>> irrespective of what value is sent to zlog. A way around it is to set
>> !z.type to 0 after each call to contour, but that shouldn't be the way
>> to do it.
>>
>> There is some simple code below to illustrate the point.
>>
> ... removed code ...
>
> I am not sure this is a bug. It is similar to the behavior of other
> /XLOG, /YLOG keywords, in the sense that once they are set, then any
> overplots are also performed in logarithmic coordinates. Since XLOG
> and YLOG are "sticky," I could see why ZLOG might be too. I will


They are only "sticky" within the same plot, which is good (even
necessary). But when a new plot is started, and the keyword is not set
then it should resort to the default, not inherit the properties from
the previous plot. Even worse in this case is that it is impossible to
override this inheritance - even if you explicitly tell it not to use a
log scale (zlog=0). You need to add the !z.type=0 line (or do a surface
plot inbetween or some other similar fix).

> grant that the ZLOG behavior is a bit surprising at first approach.
>
> The simple solution is to compute the logarithm yourself. I.e.,
>
> contour, ALOG10(dist(50))


Unless you want the original values on the contours (an aesthetic thing
in my case...)


> Craig
>
>


Jacques
Re: bug in contour? [message #27357 is a reply to message #27285] Thu, 18 October 2001 00:56 Go to previous message
Jacques is currently offline  Jacques
Messages: 5
Registered: September 1994
Junior Member
Reimar Bauer wrote:

> Jacques wrote:
>
>> Hi all
>>
>> Has anyone else run into a problem with the zlog keyword in contour? Or
>> can someone tell me where I am going wrong? It seems that if the keyword
>> is set, then any further contour plots are plotted using a log scale
>> irrespective of what value is sent to zlog. A way around it is to set
>> !z.type to 0 after each call to contour, but that shouldn't be the way
>> to do it.
>>
>> There is some simple code below to illustrate the point.
>>
>> Thanks
>> Jacques
>>
>> IDL Version 5.4 (linux x86). (c) 2000, Research Systems, Inc.
>>
>> IDL> contour, dist(50)
>> IDL> contour, dist(50), /zlog
>> % CONTOUR: Warning: Infinite plot range.
>> IDL> contour, dist(50)
>> % CONTOUR: Warning: Infinite plot range.
>> IDL> contour, dist(50), zlog=0
>> % CONTOUR: Warning: Infinite plot range.
>> IDL> !z.type=0
>> IDL> contour, dist(50)
>> IDL> contour, dist(50), zlog=0
>>
>
> IDL5.4.1 has the same bug but idl5.5beta2 is ok.
>
> regards
> Reimar
>
>


Thanks Reimar. I guess I'll have to work around it until we get 5.5 (good thing we aren't running any Mac's...)


Jacques
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Floating Underflow/Overflow
Next Topic: Is ANA dead?

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

Current Time: Wed Oct 08 17:09:01 PDT 2025

Total time taken to generate the page: 0.01123 seconds