title: How to disable the line connecting start and end points in Matplotlib?
body: <p>I have created a program that gets data and creates 2 lists:</p>
  
  <p>1) Date_list - which contains dates.</p>
  
  <p>2) Data - which contains some data.</p>
  
  <p>At the moment, it plots the <em>date_list</em> in the x axis and the <em>data</em> in the y axis. But my graph is for some reason connecting the start and end points with an additional line. I would like to disable that... How can I do it?</p>
  
  <p>The image below shows my issue.</p>
  
  <p><a href="https://i.stack.imgur.com/RREVv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RREVv.png" alt="enter image description here"></a></p>
  
  <p>Here's my code:</p>
  
  <pre><code>from notion.client import NotionClient
  from datetime import datetime
  from matplotlib import pyplot as plt
  import matplotlib.dates as mdates
  import numpy
  import pandas as pd
  
  # Obtain the `token_v2` value by inspecting your browser cookies on a logged-in session on Notion.so
  client = NotionClient(token_v2="")
  
  # Replace this URL with the URL of the page you want to edit
  page = client.get_collection_view("")
  
  all_rows = list(page.build_query().execute())
  all_rows_data = [row.get_all_properties() for row in all_rows]
  date_list = []
  data = []
  
  # Add the data of the dates and the respective screen time into 2 separate lists.
  for item in all_rows_data:
      date_time = item.get('title') + ' 2020'
      screen_time = item.get('screen_time')
      datetime_object = datetime.strptime(date_time, '%d %B %Y')
      #print(datetime_object, screen_time)
      date_list.append(datetime_object)
      data.append(screen_time)
  
  # Plot a graph using Matplotlib
  ax = plt.gca() #get axes
  
  formatter = mdates.DateFormatter("%d %B %Y") #format as a date
  ax.xaxis.set_major_formatter(formatter)
  
  locator = mdates.DayLocator() #set locator
  ax.xaxis.set_major_locator(locator)
  
  fig = plt.figure(figsize=(15, 5)) # Plot graph
  ax = fig.add_subplot(111)
  ax.plot(date_list, data, color='red', marker='o', markerfacecolor='blue', markersize=8)
  ax.plot()
  plt.show()
  </code></pre>
  
  <p>Any code suggestions are welcome too! </p>
  
  <p>Thanks in advance,</p>
  
  <p>Karthik</p>