Python Forum
Understanding The Arguments for matplotlib.pyplot.plot
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Understanding The Arguments for matplotlib.pyplot.plot
#1
Hello all

I am using the matplotlib module for the first time and trying to create a few sample plots.

I was struggling to understand the list of arguments that the pyplot.plot() function takes.

The argument lists includes

matplotlib.pyplot.plot(*args, scalex=True, scaley=True, data=None, **kwargs)
I have looked at the matplot lib website and although there is documentation on these parameters it is still not clear to me what these arguments refers to and i was hoping someone could help.

My understanding so far is:-

*args = Is the X and Y data that is to be plotted but why is there a * next to it and why is it called args?

scalex = Relates to the scaling and data view limits in the x dimension.

scaley = Relates to the scaling and data view limits in the y dimension.

data = No idea what this argument refers to????

**kwargs = The matplotlib web states that this argument relates to several properties such as label,lien width etc but how can one argument relate to
several properties??? and why is there 2 x stars (**) next to it?, does kwargs stand for anything?

Any insight would be greatly appreciated.

Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Graphic line plot with matplotlib, text file in pytho khadija 2 1,340 Aug-15-2022, 12:00 PM
Last Post: khadija
  Is Matplotlib.pyplot Loaded DaveG 2 1,276 Apr-06-2022, 06:12 AM
Last Post: DaveG
  Python 3.10 not happy with Pandas and PyPlot? Danno 1 1,544 Feb-26-2022, 05:35 AM
Last Post: Danno
  plot on the same figure using a for loo with matplotlib drSlump 2 1,668 Oct-13-2021, 07:11 AM
Last Post: drSlump
  matplotlib, no plot when using Figure ajvperth 2 1,653 Oct-12-2021, 02:29 PM
Last Post: ajvperth
  Matplotlib: How do I convert Dates from Excel to use in Matplotlib JaneTan 1 3,163 Mar-11-2021, 10:52 AM
Last Post: buran
  Python Matplotlib: How do I plot lines with different end point in the same graph? JaneTan 0 1,553 Feb-28-2021, 11:56 AM
Last Post: JaneTan
  matplotlib.pyplot.show Alienspecimen 2 2,193 Feb-27-2021, 02:32 AM
Last Post: snippsat
  Pyplot graph size TammyP 1 1,728 Jan-26-2021, 02:15 PM
Last Post: TammyP
  How to plot intraday data of several days in one plot mistermister 3 2,855 Dec-15-2020, 07:43 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020