![matlab plot matlab plot](https://i.stack.imgur.com/EmeTP.jpg)
#Matlab plot how to#
Next, we will learn how to give a title and a sub-title to the plot. This is how our input and output will look like in Matlab command window:Īs we can see in the Output, we have obtained a plot of a sine wave with the required title.
#Matlab plot full#
For a full explanation of the MATLAB system for setting default graphics object properties, see Default Property Values in the MATLAB documentation.
#Matlab plot code#
This odd-looking line of code sets the default LineWidth property for line objects to 2.0. Here it is: set(groot, 'defaultLineLineWidth',2.0) It turns out that there's a way to get MATLAB to draw all plotted lines thicker by default.
![matlab plot matlab plot](https://natkon.ch/wp-content/uploads/2014/09/Analyses.jpg)
You can do that in each call to plot by using the LineWidth parameter, like this: plot(x,y1,x,y2, 'LineWidth',2.0)īut then you have to remember to add the LineWidth parameter all the time. So, I like to plot thicker lines, roughly 1.5-2.0 points.
![matlab plot matlab plot](http://subsurface.gr/wp-content/uploads/2019/03/CustomColorOrder.png)
On a high resolution display, however, the plotted lines are pretty close to 0.5 points thick.Īnd, to my eyes, that's too thin to see the colors clearly. Because of the way the figure above was captured for display in your browser, the lines probably appear a little thicker than 0.5 points. Here's where I have to wave my hands a little. The plot above uses the default MATLAB line width of 0.5 points. Here's a basic example of plot from the MATLAB documentation: x = linspace(-2*pi,2*pi) That's because I don't use the default line thickness for my plots. You would see something like this instead:ĭo you see the difference? Exactly what you see will vary depending on your computer and your display resolution, but the original image from my blog post has thicker colored lines. If you ran my code exactly as I posted it, though, you probably wouldn't see exactly the same thing. In last week's blog post on pursuit curves, I showed this figure:
![matlab plot matlab plot](https://i.stack.imgur.com/x9z4z.png)
Today's blog post is dedicated to everyone whose eyes aren't as young as they used to be.