log axis with negative numbers [message #87960] |
Thu, 06 March 2014 14:58  |
larsonej
Messages: 3 Registered: September 2012
|
Junior Member |
|
|
Does anyone know of a way or workaround to make linear plots with a log axis that includes negative numbers. This comes up when plotting thins like vertical winds in a planetary atmosphere. The higher you go, the larger the magnitude of the wind by several orders and the sign can vary from positive to negative.
The other time this comes up is when I make a 2D contour map in which I specify levels such as [-1.e3,-1.e2,-1.e1,0,1.e1,1.e2,1.e3]. IDL makes a great color contour map, however I cannot figure out a colorbar that has colors that actually match the values in the contour plot.
Basically, I am looking for a plotting routine in which I input the maximum and minimum values for the negative and positive sides of the plot and in between the two minimums, the plot can be linear, or empty, doesn't really matter.
Any help would be appreciated.
|
|
|
Re: log axis with negative numbers [message #87963 is a reply to message #87960] |
Thu, 06 March 2014 15:51   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
larsonej@colorado.edu writes:
> The other time this comes up is when I make a 2D contour map in which I specify levels such as [-1.e3,-1.e2,-1.e1,0,1.e1,1.e2,1.e3]. IDL makes a great color contour map, however I cannot figure out a colorbar that has colors that actually match the values in the contour plot.
This article might help:
http://www.idlcoyote.com/graphics_tips/contourcolors.php
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.")
|
|
|
Re: log axis with negative numbers [message #87969 is a reply to message #87960] |
Thu, 06 March 2014 18:12  |
larsonej
Messages: 3 Registered: September 2012
|
Junior Member |
|
|
On Thursday, March 6, 2014 3:58:42 PM UTC-7, lars...@colorado.edu wrote:
> Does anyone know of a way or workaround to make linear plots with a log axis that includes negative numbers. This comes up when plotting thins like vertical winds in a planetary atmosphere. The higher you go, the larger the magnitude of the wind by several orders and the sign can vary from positive to negative.
>
>
>
> The other time this comes up is when I make a 2D contour map in which I specify levels such as [-1.e3,-1.e2,-1.e1,0,1.e1,1.e2,1.e3]. IDL makes a great color contour map, however I cannot figure out a colorbar that has colors that actually match the values in the contour plot.
>
>
>
> Basically, I am looking for a plotting routine in which I input the maximum and minimum values for the negative and positive sides of the plot and in between the two minimums, the plot can be linear, or empty, doesn't really matter.
>
>
>
> Any help would be appreciated.
Thanks David,
I realized after posting that I could specify the ticknames in the colorbar. My original problem still plagues me however.
|
|
|