I have two graphs with different scale and I would like to use subplot. How do I set axes size for subplot(211) and set different axes scale for subplot(212)???
Asked
Active
Viewed 3,033 times
1 Answers
1
subplot returns an axes object:
ha = subplot(211);
plot(1:10);
set(ha, 'xscale', 'log');
hb = subplot(212);
plot(1:10);
set(hb, 'xscale', 'linear');
Store it in a variable and set the scale as you need.

angainor
- 11,760
- 2
- 36
- 56
-
I have a plot(x, y) and I would like to give each subplot different axes range – Mario LIPCIK Oct 17 '12 at 19:02
-
1@MarioLIPCIK Generally in MATLAB, you can type `get(objhandle)` to get a list of properties of an object. In this case, type `get(ha)` to get a list of axes properties. What interests you is `xlim` property. You can set it using `set(ha, 'xlim', [xmin xmax])`. Go through the list to know what else you can do. You can set different range for the other axes using `set(hb, ...)` – angainor Oct 17 '12 at 19:11