Time for action – changing the figure properties
- Let us try to change the plot of the graph above. First:
octave:61> plot(x, f, "linewidth", 5);
This command will create the same plot as above, but here we specify the graph property
linewidth
to have the value 5 rather than 1. - To set the correct limits on the axis, we use
set
:octave:62> set(gca, "xlim", [-5.5 1])
- We can also use
set
to set the line width of the window box and the font size of the numbers on the axes:octave:63> set(gca, "linewidth", 2) octave:64> set(gca, "fontsize", 25)
- The axes labels are also set by the
set
function. Here the properties are"xlabel"
and"ylabel"
, and the property value is set using thetext
function:octave:65> set(gca, "xlabel", text("string", "x", "fontsize", ...
Get GNU Octave now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.