Python Forum
Lack of understanding "graphX, = ax.plot"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lack of understanding "graphX, = ax.plot"
#1
Dear every member

I want to under stand the following line

graphX, = ax.plot([], [], 'b', label = 'X')
this line is written in the following code which is a part of program
from matplotlib import pyplot as plt

fig = plt.figure(figsize=(12, 6))
ax = plt.axes(xlim=(0,leng-1), ylim=(0, 1000))

ax.grid(True)

graphX, = ax.plot([], [], 'b', label = 'X')
graphY, = ax.plot([], [], 'r', label = 'Y')
many thanks for all
Reply
#2
This example might help:
>>> t = (1,)
>>> t
(1,)
>>> u, = (1,)
>>> u
1
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to plot intraday data of several days in one plot mistermister 3 2,916 Dec-15-2020, 07:43 PM
Last Post: deanhystad
  Understanding The Arguments for matplotlib.pyplot.plot JoeDainton123 0 1,932 Aug-19-2020, 01:19 AM
Last Post: JoeDainton123
  How to plot vertically stacked plot with same x-axis and SriMekala 0 1,929 Jun-12-2019, 03:31 PM
Last Post: SriMekala
  Library (julian), lack of usage information samsonite 12 6,949 Mar-04-2019, 06:45 AM
Last Post: samsonite

Forum Jump:

User Panel Messages

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