IoSR-Surrey / MatlabToolbox

General purpose Matlab toolbox
MIT License
126 stars 43 forks source link

Automatically setting ylim #3

Closed TGabor closed 8 years ago

TGabor commented 8 years ago

Hi,

when using -inf or inf in ylim to let MATLAB automatically determine the y axis limits, the x separator lines disappear.

Here is an example to reproduce this issue

y = randn(50,3,3);
x = [1 2 3.5];
y(1:25) = NaN;

figure;
boxPlot(x,y,...
    'symbolColor','k',...
    'medianColor','k',...
    'symbolMarker',{'+','o','d'},...
    'boxcolor',{[1 0 0]; [0 1 0]; [0 0 1]},...
    'xSeparator',true);

%% In the following figure, the x separator lines disappear
figure;
boxPlot(x,y,...
    'symbolColor','k',...
    'medianColor','k',...
    'symbolMarker',{'+','o','d'},...
    'boxcolor',{[1 0 0]; [0 1 0]; [0 0 1]},...
    'xSeparator',true);
ylim([-inf inf]);
chummersone commented 8 years ago

Thanks for the report. I've uploaded a fix to the repo.