O.k., I promise this is the last post (by me) on this since I have
actual work work to do... I just can't help trying to figure out the
level of busted-ness.
Anyhoo, what I found out was:
1) the line thickness weirdness in the very first left-hand plot only
manifests itself when the 4th left-hand plot (7th overall) is drawn.
2) if I comment out the use of the YRANGE keyword in the "pn" plot,
everything works (except that sometimes the overplots extend beyond the
plot boundaries since the plot range is determined by the first plot).
So, somehow the yrange settings in the 4th left-hand plot is affecting
the line thickness settings of the 1st left-hand plot, as well as all
the remaining left-hand plots (where the yrange keyword is used).
I'm going to burn some incense and hop in a counter-clockwise direction
(on my left foot), all whilst mumbling oaths to the gods of gondwanaland.
Maybe that'll fix it. :o)
cheers,
paulv
On 09/06/12 18:14, Paul van Delst wrote:
> Hello,
>
> I just got IDL v8.2 installed,
> IDL> print, !version
> { x86 linux unix linux 8.2 Apr 10 2012 32 64}
>
> I have a piece of code like that shown below (it's within a loop over
> index "i"). It simply reads some "new" data and some "old" data, then it
> plots the two of them together (the "pn" and "po" plots), and then it
> plots the difference (the "pd" plot):
>
> ; Create window to hold plots
> w = WINDOW( $
> WINDOW_TITLE = rts_file_list[i], $
> DIMENSIONS = [800,900], $
> BUFFER = buffer )
> ; ...Initialise layout index
> index = 0
>
>
> ; Loop over data items
> FOR j = 0, n_items-1 DO BEGIN
>
> ; Extract the current data item from the RTS objects
> new_data = new_rts.Get_Data(item_name[j], Profile=1)
> old_data = old_rts.Get_Data(item_name[j], Profile=1)
>
> ; Plot the two data sets
> index++
> yrange = [MIN(new_data)<MIN(old_data), $
> MAX(new_data)>MAX(old_data)]
> pn = PLOT( $
> new_data, $
> TITLE = item_name[j], $
> YRANGE = yrange, $
> LAYOUT = [ n_col, n_row, index ], $
> COLOR = 'red', $
> THICK = 2, $
> CURRENT = w )
> po = PLOT( $
> old_data, $
> COLOR = 'green', $
> OVERPLOT = w )
>
> ; Plot the difference
> index++
> pd = PLOT( $
> new_data-old_data, $
> TITLE = item_name[j]+" difference", $
> LAYOUT = [ n_col, n_row, index ], $
> CURRENT = w )
>
> ENDFOR
>
>
> Now, *most* of the time this code works fine. However, every now and
> again the line that is plotted by the "pn" plot, that is the one that
> has the keyword
> THICK=2
> plots the line with what looks like the equivalent of a thickness of
> about 10, and then some subsequent lines with a thickness of zero (i.e.
> not there, or hardly visible).
>
> It's as though the first super-thick line uses up all the thick,
> starving subsequent lines.
>
> Here's an example of the wrong result, with incorrect line thicknesses:
> http://tinyurl.com/bnchou4
>
> And here's an example of the expected result, with correct line
> thicknesses throughout:
> http://tinyurl.com/d394vsy
>
> I have the red line be twice as thick so I can see it behind the green
> one when the data are the same (too many points to use symbols).
>
> Is this a bug in IDL v8.2? Has anyone seen this behaviour before and
> (fingers crossed) discovered a solution?
>
> cheers,
>
> paulv
|