ebranlard / pyDatView

A crossplatform GUI to plot tabulated data from files (e.g. CSV, Excel, OpenFAST, HAWC2, Flex...), or python pandas dataframes
MIT License
109 stars 43 forks source link

If CSV contains GPS time, plot will not display correctly #157

Closed machprogr closed 1 year ago

machprogr commented 1 year ago

If a CSV contains a time axis using GPS time (w/ a very large number), the plot will zoom out so much that you cannot see the data.

Sample CSV data to replicate:

time,ws1,ws2 1371732486,5,10 1371732487,10,20 1371732489,5,30

incorrect_zoom_display

Thanks!!

ebranlard commented 1 year ago

Hi @machprogr

Thank you for reporting this issue and providing a simple test case, that makes it easier to debug. This was definitely a wrong behavior.

It came from something I had introduced due an annoyance when looking at values that were constant on the y-axis (though I forgot the full context). I've now changed this part of the code for the x and y axis. If anything, I'll reintroduce the behavior on the y-axis, but definitely not on the x-axis.

It should now be fixed in the latest dev. Let me know if it doesn't work for you.

machprogr commented 1 year ago

Thanks! I downloaded the latest dev branch, but I get this error when I try to run :

python pyDatView.py weio/weio/tests/example_files/FASTIn_arf_coords.txt

Error: the python package weio was not imported successfully.

Most likely the submodule weio was not cloned with pyDatView Type the following command to retrieve it:

git submodule update --init --recursive

Alternatively re-clone this repository into a separate folder:

ebranlard commented 1 year ago

Jsut to be safe, can you reclone into a new directory git clone https://github.com/ebranlard/pyDatView -b dev pydatview-new and try again? The package weio used to be a submodule, so it's not straightward to go from main to dev.

machprogr commented 1 year ago

works like a champ now!!!!

Thanks!!!!

ebranlard commented 1 year ago

Great! Thanks a lot for reporting your issue.