Thread Subject: Area plot not bound in axes

Subject: Area plot not bound in axes

From: Tyco Skinner

Date: 5 Aug, 2008 17:15:04

Message: 1 of 3

For my gui, I am using the function 'area' to illustrate to
the user which section of a curve is being integrated. The
graph comes out correctly, and I can see the area that is of
interest shaded in. However, there is a problem if I use the
tools zoomin, zoomout, or pan from the menu I added at the
top using guide. The shaded area is visible outside of the
boundary of the plot axes, and shows up on top of the gray
panel that the axis is on. Only the shaded region does this,
and other lines and points that are on the same plot do not
also show up out of bounds. Any suggestions?

I also tried specifying 'area' to plot in the axis like:

area(handles.axes1, x_values, y_values)

Subject: Area plot not bound in axes

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 5 Aug, 2008 19:26:35

Message: 2 of 3

In article <g7a1qo$3l8$1@fred.mathworks.com>,
Tyco Skinner <trskinner@mmm.com> wrote:
>For my gui, I am using the function 'area' to illustrate to
>the user which section of a curve is being integrated. The
>graph comes out correctly, and I can see the area that is of
>interest shaded in. However, there is a problem if I use the
>tools zoomin, zoomout, or pan from the menu I added at the
>top using guide. The shaded area is visible outside of the
>boundary of the plot axes, and shows up on top of the gray
>panel that the axis is on. Only the shaded region does this,
>and other lines and points that are on the same plot do not
>also show up out of bounds. Any suggestions?

Which Matlab version are you using?

Do you have a relatively simple example to reproduce this?
When I try in R2007a, it doesn't appear to happen for me.
--
  "The quirks and arbitrariness we observe force us to the
  conclusion that ours is not the only universe." -- Walter Kistler

Subject: Area plot not bound in axes

From: Bastian

Date: 17 Nov, 2008 16:28:02

Message: 3 of 3

I am experiencing exactly the same problem. When I use the zoom or pan tools on an "filled 2D area" plot (contained in a uipanel ) the zoomed/panned results are graphed beyond the extent of the graphical axes bounds (i.e. area(bf,'FaceColor', c3)).

It appears as if the uipanel, which the "area plot" axes is contained by has now become the new graphical axes bounds instead. In other words, the axes bounds do not visually change in size, the plot simply draws past the axes bounds right into the uipanel background colour, right upto the uipanel edge. I am assuming that this is a bug that needs to be fixed, all other plot types (e.g. plot, bar etc.) work just fine so it must be the "area" type that needs to be fixed. I am hoping that some one at Mathworks will pick-up on this thread and fix the bug. Any help, or work-around would be much appreciated. In the meanwhile I will have to use a simple "plot" instead.

Cheers,
Bastian

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
uipanel B. Schmidt 17 Nov, 2008 11:30:23
bound incorrectly B. Schmidt 17 Nov, 2008 11:30:23
zoom tool B. Schmidt 17 Nov, 2008 11:30:23
2d area axes B. Schmidt 17 Nov, 2008 11:30:23
pan Tyco Skinner 5 Aug, 2008 13:15:11
zoom Tyco Skinner 5 Aug, 2008 13:15:11
out of bounds Tyco Skinner 5 Aug, 2008 13:15:11
axes Tyco Skinner 5 Aug, 2008 13:15:11
area Tyco Skinner 5 Aug, 2008 13:15:11
gui Tyco Skinner 5 Aug, 2008 13:15:11
rssFeed for this Thread

Contact us at files@mathworks.com