Plt.plot() vs ax.plot()

I am having trouble differentiating between ax.plot and plt.plot. Can anyone please clarify?

2 Likes

Hi @m.kassab,

Welcome to the community!

I believe this link help you to understand that:

Best,
Sahil

1 Like

Hi

  • To draw a figure, we use plt.plot
  • To draw multiple figures and arrange their order of visualization, we use ax.plot

eg. if we have to generate six graphs, then using ax.plot we can decide the position of each of six graphs…we can plot them it 6 separate rows or in 2 columns with 3 graphs in each or in any desired way.

Hope you found it useful.
Anu Jain

1 Like

If above reply is helpful, then mark it as solution.