import pandas as pd
my_dict={
'MATH':[30,33,32,32,31,34,32]
}
df=pd.DataFrame(data=my_dict)
df.plot.density()

df.plot.density(figsize=(6,3))
df.plot.density(fontsize=20)
We can use the option colors to give different colors to line . We can use one tuple to define the colours.
df.plot.density(color=[(.9,.3,.4)])
my_style=['-.']
#my_style=[':']
df.plot.density(style=my_style)
We can specify log scaling or symlog scaling for x ( logx=True ) or y ( logy=True ) or for both x & y ( loglog=True)
df.plot.density(loglog=True)
df.plot.density(secondary_y=True)
df.plot.density(mark_right=True,secondary_y=True)
df.plot.density(title='rot=180',figsize=(5,4),rot=180)
Pandas plot
plot.barh()
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.