plot in Octave
To add context as requested by kcrisman, I am using Octave in Cloud.Sagemath.com running scripts in .m files.
How does one plot in Octave? Supposedly the command should be the same as in Matlab, e.g.
x = 1:10; figure, plot(x,x.^2)
However, nothing showed up in the terminal. Please help.
We need more context here. Octave is not part of Sage, though we do have an optional interface to it. If you are using it directly inside of Sage, the answer will probably at least to some extent depend on how you are using Sage (command line, notebook, cloud).
@kcrisman: I have edited my question adding the context. Thank you.
Thanks. The answers given are good, but I wonder if they directly address running the files as scripts - maybe calc314's does?
Good point! The code I provided will run in a .m file as a script. To get the plot to open automatically, we can use a `system` call to the `open` command. I'll modify my answer.