How do I change the marker size with the zoom setting.

조회 수: 3 (최근 30일)
Peter Manley-Cooke
Peter Manley-Cooke 2011년 3월 29일
How do I change the marker size to make the markers, points in this case, bigger after zooming in about four times. They then should get smaller when zooming out. The points get very sparse after zooming in and are difficult to spot when they are so small (size 1), but if they are larger when zoomed out all the fine detail is lost.
I have tried the postzoom callback, but there is no way to tell how much zooming has been done in either direction.

답변 (1개)

Matt Fig
Matt Fig 2011년 3월 29일
You can set an ActionPostCallback to execute after a zoom operation has completed. This is where you change the MarkerSize property. Also, to tell whether the zoom was in or out within that callback, look at the Direction property of the zoom object.
To see these properties, look at:
doc zoom
  댓글 수: 2
Peter Manley-Cooke
Peter Manley-Cooke 2011년 3월 30일
Yes, I have looked at these. The problem is keeping track of how many zooms in an out have been done and in which direction (horiz, vertical). Do you know how the box zoom sets the properties?
I suppose we could keep a zoom variable in the userdata, or perhaps the original x and y axis limits to compare the zoomed limits with.
Daniel Sternberg
Daniel Sternberg 2011년 4월 13일
The box zoom simply changes the axes limits. The easiest thing to do is to cache the original limits and compute the new marker size based on the current axes limits in the post callback.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Exploration에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by