How to change axes during a for cycle?
Show older comments
I would like to make a figure and show the axes and tics without any plot at this moment. After that I would like to plot several things using a for cycle and change the axes in every cycle, but do not make it visible, so I dont want to replot tics and labels, but use the new axes as a reference coordinate system for the new plots. How to do this? How to define and use new axes invisible, and how to set its position relative to the original figure?
5 Comments
Jan
on 1 Oct 2015
I do not understand the question. In the first sentence the axes is is visible. But in the second sentence, you do not want to make it visible. Then you want to use "the new axes" - which new axes? What do you mean by "reference coordinate system"? For which new plots?
Mr M.
on 1 Oct 2015
Joseph Cheng
on 1 Oct 2015
the the main question is why not adjust the fill() and keep the axis the same to get the same shifted square result.
Mr M.
on 1 Oct 2015
Answers (1)
You create an axes, which is not visible, by defining its property 'Visibile' as 'off'. Setting the position relative to the figure is done by using 'normalized' 'units'. This is explained in the documentation of the axes command.
[EDITED] The X- and Y-limits can be defined by the set command also.
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!