2D density plot and logarithmic axes [message #87591] |
Mon, 17 February 2014 03:40  |
simona bellavista
Messages: 56 Registered: December 2009
|
Member |
|
|
I want to make a density plot in 2D and then plot it. More or less like with contours but with a color levels changing smoothly one in the other.
I computed a 2D density matrix and then I figured out I should use cgimage.
but now I have the problem that I have logaritmic axes and I can't figure out to include them in the plot. If I specify xrange and yrange I only get linear axes.
Then on top of that I have to plot other things, like curves, points with error bars, etc.
this looks like a basic task, can you suggest a better way to make such a plot?
|
|
|
Re: 2D density plot and logarithmic axes [message #87596 is a reply to message #87591] |
Mon, 17 February 2014 05:25  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
simona bellavista writes:
> I want to make a density plot in 2D and then plot it. More or less like with contours but with a color levels changing smoothly one in the other.
>
> I computed a 2D density matrix and then I figured out I should use cgimage.
> but now I have the problem that I have logaritmic axes and I can't figure out to include them in the plot. If I specify xrange and yrange I only get linear axes.
>
> Then on top of that I have to plot other things, like curves, points with error bars, etc.
>
> this looks like a basic task, can you suggest a better way to make such a plot?
I think I would try using the AXKeywords keyword to cgImage to set the
XLog and YLog keywords for the plot axes. Alternatively, you might find
the PG_PlotImage command in the "public" folder of the Coyote Library
helpful.
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.")
|
|
|