Python Forum
how to include characters in a diagram with matplotlib
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to include characters in a diagram with matplotlib
#1
Hello;
I created an application with which if I click on the button "save", there is creation of a text file in which I save data in columns. among these data there is the date in first colone
here is the contents of the file (file.txt):



01/12/2010 ... 0.132
02/05/2011 ... 0.186
28/12/2011 ... 0.168
04/06/2012 ... 0.122
29/12/2012 ... 0.144
06/06/2013 ... 0.112
07/01/2014 ... 0.186
08/06/2014 ... 0.168
19/12/2014 ... 0.152
10/06/2015 ... 0.164


this content is not fixed since each time you click on the save button a new line is added to the text file


import numpy as np
import matplotlib.pyplot as plt

def graphe_loc35R():
	x,y = np.loadtxt("file.txt", unpack=True)
	plt.plot(x,y,'o')
	
	plt.xlabel('date')
	plt.ylabel('ddm')
	
	plt.show()
I would like help to find out how to include characters in the x-axis of a diagram built with matpltlib

thanks
Reply


Messages In This Thread
how to include characters in a diagram with matplotlib - by atlass218 - Sep-20-2018, 11:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Deleting characters between certain characters stahorse 7 1,155 Jul-03-2023, 12:59 AM
Last Post: Pedroski55
  Should you include uneven data donnertrud 0 1,565 Jan-20-2020, 07:42 AM
Last Post: donnertrud
  error: INCLUDE environment variable is empty xwchen 4 7,078 Mar-22-2018, 03:40 AM
Last Post: xwchen

Forum Jump:

User Panel Messages

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