How can I make plots that will fill the available space, do not autoscale and keep their size and scaling like I tell it.

4 views (last 30 days)
I have problems with making plots. I need to show nine examples of some 3d reconstruction, with the same scaling on all axis. I use front and side views to show the 3d structures. Thickness is about a tenth of the width, and the objects are lower than wide. So, I create a 3 x 3 raster with each containing a side and front view. To do this I use subplot(3,36,a:b) for each plot. (i.e.
subplot(3,36,1:10); plot(front1);
subplot(3,36,11:12); plot(side1);
subplot(3,36,13:22); plot(front2);
etc).
Of course not all objects are the same size, but they all need to be plotted on the same scale in x, y and z! Also, I want to get rid of some of the ridiculous spacing in matlab, especially since in the final figure I will use a scalebar instead of axis.
To get the x and y axes of the plots to scale together I use
daspect(h,[1 1 1]);
I set the x-axis of the first plot (the wide one) to some specific values that will fit the data nicely. The y-axis scales with it, so far so good. I then need the right plot (narrow one) to get that same y-axis scaling, so:
y=get(h(1),'YLim');
set(h(2),'YLim',y);
The x-axis scales with it, so that's fine.
BUT there are some very frustrating issues: Matlab insists in several instances that the scaling on axis can be the same, but the plot area should be different between left and right plots. Of course this will throw off the scaling between plots. Also, I set all examples with the same x-axis on the wide panel, but matlab then changes the width of the plot itself making the scaling different for each panel.
I can't figure out how to work this. How can I FORCE matlab to use the FULL area it has available to draw the panel in.
Any help would be wonderful. Currently I am rescaling everything by hand in illustrator which is the absolute worst.

Answers (0)

Categories

Find more on Graphics Object Programming 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!