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

Home » Public Forums » archive » NG: bring_to_front doesn't always work
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: NG: bring_to_front doesn't always work [message #89210 is a reply to message #89208] Mon, 04 August 2014 18:35 Go to previous messageGo to previous message
dg86 is currently offline  dg86
Messages: 118
Registered: September 2012
Senior Member
Dear Chris,

I believe I've narrowed it down. Error bars erroneously obscure some overlying plot
symbols provided that two conditions are met:
1. at least two data sets are plotted in the same plot using the OVER keyword and
2. the primary plot is resized using the POSITION keyword.
In this case, some of the plot symbols in the secondary plot will be obscured,
not the primary.

The following example is not exactly minimal, but reproducibly exercises the bug.
Set bug = 0 to turn the bug off.

Thanks for looking into this. TTFN,

David


===== cut here for example =====
bug = 1 ; buggy plot if true

colors = ['lavender', 'yellow']
symbols = ['s', 'o']

;;;;;
;
; The primary plot
;
; All is well unless this has its shape changed with the
; POSITION keyword
;
pos = [0.125, 0.11, 0.97, 0.97]

t = [15, 20, 25, 30, 40, 50, 60, 90, 120] ; sampling times [minutes]
ap = [0.422150, $
0.539150, $
0.646400, $
0.704250, $
0.730250, $
0.753000, $
0.754300, $
0.786150, $
0.781600] ; radius [micrometers]
dap = [[0.032500, 0.021450], $
[0.052650, 0.056550], $
[0.115050, 0.058500], $
[0.065000, 0.048750], $
[0.055250, 0.054600], $
[0.053300, 0.031850], $
[0.070850, 0.078000], $
[0.052650, 0.112450], $
[0.027300, 0.055250]] ; range of radii [micrometers]

pl = errorplot(t, ap, dap, linestyle = '', $
xrange = [0, 130], $
xtitle = 't [min]', ytitle = '$a_p(t)$ [$\mu$m]', $
errorbar_color = 'grey', $
font_size = 16)
ps = plot(t, ap, linestyle = '', sym_color = 'grey', sym_fill_color = colors[0],$
symbol = symbols[0], /sym_filled, sym_size = 1.2, $
sym_thick = 1.5, $
over = pl)

if bug then pl.position = pos

;;;;;
;
; The secondary plot
;
; Some, but not all plot symbols (circles) are obscured by vertical
; bar if the primary plot's shape was changed with the POSITION
; keyword
;
t = [15, 25, 35, 45, 60, 90]

ap = [0.502400, $
0.650400, $
0.835200, $
0.913600, $
0.976000, $
0.998400]
dap = [[0.036800, 0.035200], $
[0.032800, 0.040000], $
[0.054400, 0.044800], $
[0.060000, 0.049600], $
[0.057600, 0.049600], $
[0.047200, 0.042400]]

pl2 = errorplot(t, ap, dap, linestyle = '', over = pl)
ps2 = plot(t, ap, linestyle = '', sym_color = 'black', $
symbol = symbols[1], /sym_filled, sym_fill_color = colors[1], sym_size = 1.5, $
sym_thick = 2, $
over = pl)

;;;;;
;
; Even moving the symbols to the "front" doesn't fix the issue
;
ps2.order, /bring_to_front

;pl.save, 'minimal2.png', resolution = 150, border = 1

===== end of example =====
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Mosaicking a folder of TIFF files that includes 1-D horizontal strips
Next Topic: covariance matrix

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

Current Time: Fri Oct 10 05:10:13 PDT 2025

Total time taken to generate the page: 0.96209 seconds