I have a chart created from df.plot(style="o")
where the o
markers are too big. Would it be possible to size them down?
import pandas as pd
df = pd.DataFrame(range(1, 10))
df.plot(style="o")
How can I shrink them down?
The size of a plot can be modified by passing required dimensions as a tuple to the figsize parameter of the plot() method. it is used to determine the size of a figure object. Where dimensions should be given in inches.
Set the figure size and adjust the padding between and around the subplots. Create random data points, x. Plot x data points using plot() method, with linewidth =0.5 and color="black".
After investigation, it looks like that you can pass the ms
, short for markersize
(which also work) argument directly to pandas.plot()
such has:
import pandas as pd
df = pd.DataFrame(range(1, 10))
df.plot(style="o", ms=3)
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