Thread Subject: Axis behavior in uipanel

Subject: Axis behavior in uipanel

From: Stephan

Date: 25 Sep, 2009 15:31:04

Message: 1 of 2

Hi all,

I have a problem when displaying axes in a uipanel. Some objects (rectangles and bars for example) are flowing over the boundary of the axis (while plots are clipped as expected). Is this a bug or a feature?
Here is some code to illustrate my problem:

figure;
uipan = uipanel('Position',[0.1 .1 .8 .8],'BackgroundColor',.5*[1 1 1]);
ax = axes('Parent',uipan,'Position',[.1 .1 .6 .6]);
hold on
b = bar(1:10,'Parent',ax);
r = rectangle('Position',[0 0 2 10],'Parent',ax,'FaceColor','r');
p = plot(1:10,'Color','g','LineWidth',10);
set(ax,'XLim',[0 5],'YLim',[0 5])


As you can see, the plot is not displayes outside the boundaries of the axis, but the rectangle and bars are. I would like to know whether there's a way to avoid this overflowing. I think similar questions have been posted before,but without a response.

Thanks in advance,

Stephan

Subject: Axis behavior in uipanel

From: Stephan

Date: 25 Sep, 2009 15:49:02

Message: 2 of 2

OK, found out in the bug report list that this is an actual bug, though with a possible workaround (setting the renderer of the figure to zbuffer or opengl). See here:

http://www.mathworks.com/support/bugreports/search_results?search_executed=1&keyword=uipanel&release_filter=Exists+in&release=0&selected_products=&commit=Search

under bug number 260354.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
clipping Stephan 25 Sep, 2009 11:34:04
axes Stephan 25 Sep, 2009 11:34:04
gui Stephan 25 Sep, 2009 11:34:04
uipanel Stephan 25 Sep, 2009 11:34:04
axis Stephan 25 Sep, 2009 11:34:03
rssFeed for this Thread

Contact us at files@mathworks.com