Python Forum
Plotting Matplotlib Grid Lines
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plotting Matplotlib Grid Lines
#11
If you're using vscode you have to put in the entire path to it. I found out that they are working on a fix for that.

You can also use the file output I uploaded. Each row is a list or just make up data.

All of the data input works great. Just wanted the major xticks to show %H%M vise the date and to have minor ticks every 10 or 15 min.
Gary
Reply
#12
There's a statement that I usually include in all of my code that assures I know where my starting directory is localed:
os.chdir(os.path.abspath(os.path.dirname(__file__)))
I thought that I had added that, but didn't so IT's loading the file in, but still not happy, now getting
Error:
Traceback (most recent call last): File ".../Projects/T-Z/T/TryStuff/src/ticks.py", line 9, in <module> 'id', 'rdate', 'rtype', 'hist', 'scan'], usecols=[0, 1, 2, 3, 4]) File ".../Projects/T-Z/T/TryStuff/venv/lib/python3.7/site-packages/pandas/io/parsers.py", line 697, in parser_f return _read(filepath_or_buffer, kwds) File ".../Projects/T-Z/T/TryStuff/venv/lib/python3.7/site-packages/pandas/io/parsers.py", line 430, in _read data = parser.read(nrows) File ".../Projects/T-Z/T/TryStuff/venv/lib/python3.7/site-packages/pandas/io/parsers.py", line 1134, in read ret = self._engine.read(nrows) File ".../Projects/T-Z/T/TryStuff/venv/lib/python3.7/site-packages/pandas/io/parsers.py", line 1990, in read data = self._reader.read(nrows) File "pandas/_libs/parsers.pyx", line 899, in pandas._libs.parsers.TextReader.read File "pandas/_libs/parsers.pyx", line 914, in pandas._libs.parsers.TextReader._read_low_memory File "pandas/_libs/parsers.pyx", line 991, in pandas._libs.parsers.TextReader._read_rows File "pandas/_libs/parsers.pyx", line 1050, in pandas._libs.parsers.TextReader._convert_column_data pandas.errors.ParserError: Too many columns specified: expected 5 and found 1
Which I'm sure I can figure out, I just need to get a time slot to do that. Should be a simple fix

I have 32 Gig of memory, so don't know why It shows low_memory
Reply
#13
Thank you for the tip. I will start putting that in all my scripts.
Gary
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] cutomtkinter matplotlib no x,y - xaxis and x,y - labels-> only graph and grid visible dduric 0 231 Feb-20-2024, 07:09 PM
Last Post: dduric

Forum Jump:

User Panel Messages

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