How to make the axis limits only adjust for some objects, without slowing down plotting?

1 view (last 30 days)
I have an application where I plot a road, a host vehicle and objects surrounding the host vehicle from a birdview perspective. The road is plotted once and the objects are updated periodically by setting the XData and YData properties.
Since the road can be very long but all objects are close to the host vehicle, I would like the axis limits to automatically adjust for the objects, but not for the road.
The only thing that worked so far has been to calculate the x and y range in which objects exist and call axis() with the new limits every time the objects are updated. Unfortunately this approach slows down my application significantly.
Is there another way?
I'm using Matlab R2013b.

Answers (0)

Categories

Find more on Graphics Object Programming in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!