[Bug Fix] Octave doesn’t print markers jointly with errorbar

I couldn’t plot two curves with confidence interval using errorbar in Octave 3.2. When I include errorbar it mess the markers. I found that it is really a bug. Jarno Rajahalme publish a fix to it on Nabble (which works for me):

%% HACK FIX 2/22/2010 Jarno Rajahalme 
%% Apparently the "line" with markers and errorbars needs to be added AFTER 
%% the normal line, for the legend to have the markers present 
%% See also below 
[+]    hll = __line__ (hg); 


%% HACK FIX 2/22/2010 Jarno Rajahalme 
%% Apparently the "line" with markers and errorbars needs to be added AFTER 
%% the normal line, for the legend to have the markers present 
%% This line added ABOVE, only set the properties here 
%% NOTE: if "parent" property is set, the legend will be again drawn without markers! 
%% 

[-]    __line__ (hg, "xdata", get (hl, "xdata"), 
[-]	      "ydata", get (hl, "ydata"), 
[-]	      "color", get (hl, "color"), 
[-]	      "linewidth", get (hl, "linewidth"), 
[-]	      "linestyle", get (hl, "linestyle"), 
[-]	      "marker", "none", "parent", hg); 

[+] set (hll, "xdata", get (hl, "xdata")); 
[+] set (hll, "ydata", get (hl, "ydata")); 
[+] set (hll, "color", get (hl, "color")); 
[+] set (hll, "linewidth", get (hl, "linewidth")); 
[+] set (hll, "linestyle", get (hl, "linestyle")); 
[+] set (hll, "marker", "none"); 
[+] %set (hll, "parent", hg); 

See ya

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: