makeSubplotScalesEqual(h,w,IDX, FIG )
Often we use subplots to compare data.
This means we want the scales to be comparable.
This function goes through subplots and finds the one with the largest scaling. It then applies this scale to each of the other subplots.
The syntax is like subplot:
for i=1:6
subplot(2,3,i);
plot( rand(3) );
end
makeSubplotScalesEqual(2,3, [1:6] )
or simply
makeSubplotScalesEqual(2,3) % for all 6 subplots
This makes each of the 6 plots have equal limits.
The function also sets colour limits, e.g. for image() plots.
The function can also operate across multiple figures.
Zitieren als
Sanjay (2024). makeSubplotScalesEqual(h,w,IDX, FIG ) (https://www.mathworks.com/matlabcentral/fileexchange/48330-makesubplotscalesequal-h-w-idx-fig), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
- MATLAB > Graphics > Formatting and Annotation > Axes Appearance > Combine Multiple Plots > Subplots >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0.0 |