Cut Off subplots in figure window
Ältere Kommentare anzeigen
Hi guys,
I want to plot some results form previous calculations in two subplots by meshes. Additionally i want to plot a colorbar which represents the magnitude of the values in z direction forboth of the plots. I got all of these subplots to work the way i want them to but apparently the right subplot is cut off.
below you see the code of an example and the printed .png-file i created of the same example
x = rand(10,10);
y = x;
z = x;
azleft = 90;
azright = 270;
elleft = 90;
elrright = -90;
topologie = figure;
links = subplot(1,2,1);
mesh(x,y,z)
view(azleft, elleft);
rechts = subplot(1,2,2);
rechts.YAxisLocation = 'right';
mesh(x,y,z)
view(azright, elrright);
posSubplot2 = get(rechts, 'Position');
posSubplot2(1) = posSubplot2(1) + 0.15;
set(rechts, 'Position', posSubplot2);
posSubplot1 = get(links,'Position');
colorbar('Position', [posSubplot1(1)+posSubplot1(3)+0.075 posSubplot1(2) 0.05 posSubplot1(2)+posSubplot1(3)*2.1])
i also would prefer the y-axis of the ricght graph to be displayed on the right side of the graph.
Thanks for your help in advance!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Subplots finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!