graph - Matlab Subplot of symbolic functions (with quite different range and domain), Want to achieve same axis scale for every subplot -
I have 3 subplaces in Metlab, each curve has a very different domain and category. I want to have the same scale (1 unit = 1 cm paper) in X and Y axes of all graphs.
I can not use LinkProp for XMIM or Yelam, as the domain and category are quite different, and the entire graph does not appear.
Please give some suggestions.
I can not say that I am proud of this, but it seems to work!
x1 = 0: 1: 1; X2 = 50: 1: 90; X3 = 0.043: 0.001: 0.089; Y1 = sin (x1); . Y2 = x2 ^ 2; Y3 = -x3; R = maximum ([max (y3) -min (y3) max (y2) -min (y2) max (y1) -min (y1)]); D = maximum ([max (x3) -min (x3) max (x2) -min (x2) max (x1) -min (x1)]); K = maximum (R, D); Subplot (1,3,1) plot (x1, y1) axis ([min (x1) - (k maximum (x1) + min (x1)) / 2 max (x1) + (k max (x1) + min ( X1)) / 2 ... min (y1) - (a-max (y1) + min (y1)) / 2 maximum (y1) + (k maximum (y1) + min (y1)) / 2] (3 , 2, 2) Explosives (1,3,2) Plot (x2, y2) axis ([min (x2) - (k maximum (x2) + min (x2)) / 2 max (x2) + (k-max (X2)) + minute (x2)) / 2 ... min (y2) - (max-max2) min (y2) / 2 maximum (y2) + (max-max2y2) Y2)) / 2]) subplot (1,3,3) plot (x3, y3) axis ([min (x3) - (k T (x3) + min (x3)) / 2 max (x3) + (K max (x3) + min (x3)) / 2 ... min (y3) - (k maximum (y3) + min (y3) ) / 2 max (y3) + (k maximum (y3) + minute (y3)) / 2])
Comments
Post a Comment