Adding plots with different vertical ranges
1 | initial version |
Adding plots with different vertical ranges
2 | No.2 Revision |
Adding plots I would like to combine graphs of single-variable functions with different vertical rangesranges specified for each. As a test, I tried:
p=plot(x^3, x, -2, 2, ymin=-1, ymax=1)
q=plot(exp(x), x, -2, 2, ymin=0, ymax=4)
(p+q).show()
hoping to display the two graphs with the respective desired vertical ranges, but this does not give the desired result: the second ymin/ymax specification apparently overrides the first. Various similar attempts also failed. Is there a syntax that makes this work?
(Obviously, in this test case, one could simply change the horizontal range in each plot to produce the desired vertical range, but this would be tedious if one were adding a larger number of plots involving more complicated functions.)
3 | No.3 Revision |
I would like to combine graphs of single-variable functions with different vertical ranges specified for each. As a test, I tried:
p=plot(x^3, x, -2, 2, ymin=-1, ymax=1)
q=plot(exp(x), x, -2, 2, ymin=0, ymax=4)
(p+q).show()
hoping to display the two graphs with the respective desired appropriate vertical ranges, but this does not give the desired result: the second ymin/ymax specification apparently overrides the first. Various similar attempts also failed. Is there a syntax that makes this work?
(Obviously, in this test case, one could simply change the horizontal range in each plot to produce the desired vertical range, but this would be tedious if one were adding a larger number of plots involving more complicated functions.)