Ask Your Question

Revision history [back]

You can do something like this:

sage: P = plot(cos(x), (x,-2*pi, 2*pi), legend_label='cos(x)')+plot(cos(3*x), (x,-2*pi, 2*pi), color='green', legend_label='cos(3x)')
sage: P.ymin(-1.5)

Then evaluating P will yield this picture: image description

Is this the sort of thing you want? Note that you could also include ymin=-1.5 in the command defining the plot:

sage: plot(cos(x), (x,-2*pi, 2*pi), legend_label='cos(x)')+plot(cos(3*x), (x,-2*pi, 2*pi), color='green', legend_label='cos(3x)', ymin=-1.6)
click to hide/show revision 2
fix typo in last line

You can do something like this:

sage: P = plot(cos(x), (x,-2*pi, 2*pi), legend_label='cos(x)')+plot(cos(3*x), (x,-2*pi, 2*pi), color='green', legend_label='cos(3x)')
sage: P.ymin(-1.5)

Then evaluating P will yield this picture: image description

Is this the sort of thing you want? Note that you could also include ymin=-1.5 in the command defining the plot:

sage: plot(cos(x), (x,-2*pi, 2*pi), legend_label='cos(x)')+plot(cos(3*x), (x,-2*pi, 2*pi), color='green', legend_label='cos(3x)', ymin=-1.6)
ymin=-1.5)