hbar baseline handle always prints

3 views (last 30 days)
Ian
Ian on 20 Jan 2011

I am taking a series of datapoints and overlaying many 'hbar' histograms. I am doing this by using the 'axes' command and then typing 'axis off' and setting the hbars transparent so that the reader can see both the datapoints themselves through the histogram and the probability distribution.

Everything looks great, however when I go to save the figure or print the figure, each 'axes' containing the hbars plots big vertical bar over my plot from the 'baseline' handle, i.e

B = barh(Y,n);
baseline_handle = get(B,'BaseLine');

I've tried both:

set(baseline_handle,'Color',[1 1 1]); 

so that the baseline handle should appear 'white' and not be printed or saved.. It appears okay in the MATLAB figure, but after saving or printing, the vertical dotted line streaks through my figure in black.

I tried this too

set(baseline_handle,'LineWidth',0);

This command is not allowed.

I've also tried

set(baseline_handle,'LineStyle','none');

which does not work either.

Accepted Answer

Doug Hull
Doug Hull on 20 Jan 2011
Have you tried
delete(baseline_handle)

More Answers (0)

Categories

Find more on Read, Write, and Modify Image in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!