I am using matplotlib to graph out some data in which takes time over a time, therefore I have to use plot_date in order to plot my lines. But for some reason Plot_Date and Plot have completely different formatting as far as connecting lines.
Here is what It looks like when using plot(x,y)
Using plot(x,y,'bo')
or plot_date(x,y,'bo')
Plot_date(x,y)
looks like that ^^ too.
and using plot_date(x,y,'bo-')
How do I make it so that the result of plot_date
looks like the first picture? I have looked all over the Matplotlib website and couldn't find anything.
Thanks in advance
MatPlotLib with Python Add an axes to the current figure as a subplot arrangement. Create lists for x, y and z. To connect the points, use plot() method with x, y and z data points with black color line. To display the figure, use show() method.
Import matplotlib. To create subplot, use subplots() function. Next, define data coordinates using range() function to get multiple lines with different lengths. To plot a line chart, use the plot() function.
Upon further investigation I found that in order to display a solid line without dots, I needed to use the line style 'b-', making the code plot_date(x,y,'b-')
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With