Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Combining different figures in octave requires you to use hold on. In Sage, different figures can be combined just by adding them. So, an equivalent version of your code above would look like:

p = sum(point((i, i^2)) for i in range(1, 11))
p.show() # to show the figure

This holds more generally, and you can do the following to combine many different types of plots. Just make sure to use show after you have added all the plots you wanted to add.

p = plot(x, color='red')
q = plot(x^3, color='green')
p+q  # or (p+q).show() if you have additional lines of code below this

Combining different figures in octave requires you to use hold on. In Sage, different figures can be combined just by adding them. So, an equivalent version of your code above would look like:

p = sum(point((i, i^2)) for i in range(1, 11))
p.show() # to show the figure

This holds more generally, and you can do the following to combine many different types of plots. Just make sure to use show after you have added all the plots you wanted to add.

p = plot(x, color='red')
q = plot(x^3, color='green')
p+q  # or (p+q).show() if you have additional lines of code below this

The documentation on plotting is quite extensive. You should look that up to get some idea on how to deal with plots.

Combining different figures in octave requires you to use hold on. In Sage, different figures can be combined just by adding them. So, an equivalent version of your code above would look like:

p = sum(point((i, i^2)) for i in range(1, 11))
p.show() # to show the figure

This holds more generally, and you can do the following to combine many different types of plots. Just make sure to use show after you have added all the plots you wanted to add.

p = plot(x, color='red')
q = plot(x^3, color='green')
p+q  # or (p+q).show() if you have additional lines of code below this

The documentation on plotting is quite extensive. You should look that up to get some idea on how to deal with plots.

If in your original question you were asking about animated plots, then even that is possible. Look up the documentation of the animate function.