
How to adjust line thickness in Octave plots
In this tutorial, I will show you how to modify the thickness of lines in Octave plots to make them more visible and clear.
Here's an example to illustrate the process.
First, create an array containing the values of the variable x.
>> x=0:1:10;
Then, create another array containing the values of the variable y.
>> y=x.^2;
To plot the function graph, use the command plot(x,y)
However, you may find that the line in the graph is too thin and difficult to see.
To fix this, assign the graph to a variable by using plot(x, y) and storing the output in a variable like "graph":
>> graph = plot(x, y);
Then, use the set() command to adjust the line LineWidth property to 3, as shown below
set(graph, "LineWidth", 3);
This will increase the thickness of the line in the graph and make it much clearer.
If you find this tutorial helpful, please continue to follow our posts for more useful tips and tricks.