# HG changeset patch # User David Bateman # Date 1272481803 -7200 # Node ID eb69d94e8648be1f86e93bbf3e8aa065e4f46dca # Parent ec3cec8277dfd5dc71167eb0affd87a114d247d1 Update the errorbar markers in a seperate listtener function diff -r ec3cec8277df -r eb69d94e8648 scripts/ChangeLog --- a/scripts/ChangeLog Wed Apr 28 01:41:22 2010 -0400 +++ b/scripts/ChangeLog Wed Apr 28 21:10:03 2010 +0200 @@ -1,3 +1,8 @@ +2010-04-27 David Bateman + + * plot/private/__errplot__.m: Update the marker in a seperate + listener function. + 2010-04-27 Rik * plot/private/__go_draw_axes__.m: Use "." for marker when plotting diff -r ec3cec8277df -r eb69d94e8648 scripts/plot/private/__errplot__.m --- a/scripts/plot/private/__errplot__.m Wed Apr 28 01:41:22 2010 -0400 +++ b/scripts/plot/private/__errplot__.m Wed Apr 28 21:10:03 2010 +0200 @@ -135,23 +135,30 @@ endif endswitch + hl2 = __line__ (hg, "xdata", get (hl, "xdata"), + "ydata", get (hl, "ydata"), + "color", get (hl, "color"), + "linewidth", get (hl, "linewidth"), + "linestyle", get (hl, "linestyle"), + "marker", marker, "parent", hg); + addproperty ("color", hg, "linecolor", get (hl, "color")); addproperty ("linewidth", hg, "linelinewidth", get (hl, "linewidth")); addproperty ("linestyle", hg, "linelinestyle", get (hl, "linestyle")); - addproperty ("marker", hg, "linemarker", get (hl, "marker")); + addproperty ("marker", hg, "linemarker", get (hl2, "marker")); addproperty ("markerfacecolor", hg, "linemarkerfacecolor", - get (hl, "markerfacecolor")); + get (hl2, "markerfacecolor")); addproperty ("markeredgecolor", hg, "linemarkerfacecolor", - get (hl, "markeredgecolor")); + get (hl2, "markeredgecolor")); addproperty ("markersize", hg, "linemarkersize", - get (hl, "markersize")); + get (hl2, "markersize")); addlistener (hg, "color", @update_props); addlistener (hg, "linewidth", @update_props); addlistener (hg, "linestyle", @update_props); - addlistener (hg, "marker", @update_props); - addlistener (hg, "markerfacecolor", @update_props); - addlistener (hg, "markersize", @update_props); + addlistener (hg, "marker", @update_marker); + addlistener (hg, "markerfacecolor", @update_marker); + addlistener (hg, "markersize", @update_marker); addproperty ("xdata", hg, "data", get (hl, "xdata")); addproperty ("ydata", hg, "data", get (hl, "ydata")); @@ -167,22 +174,22 @@ addlistener (hg, "xldata", @update_data); addlistener (hg, "xudata", @update_data); - __line__ (hg, "xdata", get (hl, "xdata"), - "ydata", get (hl, "ydata"), - "color", get (hl, "color"), - "linewidth", get (hl, "linewidth"), - "linestyle", get (hl, "linestyle"), - "marker", marker, "parent", hg); endfor endfunction function update_props (h, d) set (get (h, "children"), "color", get (h, "color"), - "linewidth", get (h, "linewidth"), "linestyle", get (h, "linestyle"), - "marker", get (h, "marker"), "markersize", get (h, "markersize"), - "markerfacecolor", get (h, "markerfacecolor"), - "markeredgecolor", get (h, "markeredgecolor")); + "linewidth", get (h, "linewidth"), "linestyle", get (h, "linestyle")); +endfunction + +function update_marker (h, d) + kids = get (h, "children"); + kids (! cellfun (@isempty, get (kids, "ldata")) + & ! cellfun (@isempty, get (kids, "xldata"))) = []; + set (kids, "marker", get (h, "marker"), "markersize", get (h, "markersize"), + "markerfacecolor", get (h, "markerfacecolor"), "markeredgecolor", + get (h, "markeredgecolor")); endfunction function update_data (h, d)