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

Home » Public Forums » archive » cgPlotS and cgColorBar issues
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
cgPlotS and cgColorBar issues [message #83626] Fri, 15 March 2013 13:58
allisonjaynes is currently offline  allisonjaynes
Messages: 26
Registered: May 2012
Junior Member
Hi everyone,
Forgive me if these questions have already been answered.

Let me start with cgPlotS. I am using it to plot 2 color-scaled data curves on top of each other, so I have 2 calls to it in a row, one for each data set. For example,
cgPlot, [xrange], [yrange], /NODATA, /Window
if sat NE 'b' then cgPlotS, JDa, La, color=BSCLa, /AddCMD
if sat NE 'a' then cgPlotS, JDb, Lb, color=BSCLb, /AddCMD

When I have the condition where I want to plot both sets, I can watch cgPlotS plotting data set A in a resizeable graphics window. But when it moves on to the second call, it erases what it just plotted and then re-draws the A data set before drawing the B data set on top of it. The end result is correct (2 curves overplotted), but the drawing of the A data set twice is undesirable. For large data intervals, the plotting time ends up being on the order of minutes and the time sink for re-plotting A is driving me nuts. Any idea what causes/fixes this?



The second issue concerns cgColorBar. Below is my call:

for z=0, fix(scaleZ) do ticklog=[ticklog, 10L^z]

cgColorBar, /YLOG, /Vertical, Position=[0.94, 0.05, 0.96, 0.95], title='Electron Flux (cm!e2!n s sr MeV)!e-1!n', YTICKV=ticklog, color='white', /right, range=[1,10L^z], /AddCMD

The idea is to have a vertical, log-scaled color bar with divisions of powers of ten. Here is the weird part. Sometimes when I plot this the color bar labels look like so: [1, 10, 10^2, 10^3, 10^4....], where the carrot-raised number actually appears as an exponential. Other times (without changing the code whatsoever) the labels come out like this: [1, 10, 100, 1000, 10000....]. The parameter that determines the display format is the limit of the range - if it goes up to 10^5 or higher, everything stays in exponential format. If the maximum range is 10^4 or lower, it displays in regular format. Suggestions on how to force the exponential display?

Thank you for any guidance!


-Allison
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Findind NANs in unformatted image data
Next Topic: Re: help with transparent plot in version 8.2.2

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

Current Time: Wed Oct 08 11:35:18 PDT 2025

Total time taken to generate the page: 0.00437 seconds