Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] g.gui.tplot: y values in stvds plots are unordered #3644

Open
veroandreo opened this issue Apr 22, 2024 · 4 comments
Open

[Bug] g.gui.tplot: y values in stvds plots are unordered #3644

veroandreo opened this issue Apr 22, 2024 · 4 comments
Labels
bug Something isn't working GUI wxGUI related temporal Related to temporal data processing

Comments

@veroandreo
Copy link
Contributor

Describe the bug
I'm trying to plot the time series values of a points STVDS with g.gui.tplot. The STVDS is created with t.vect.observe.strds. When plotting the values of any single point I get something like:

image

Values of Y axis are not in order and they depict a 1:1 line.

To Reproduce
Steps to reproduce the behavior:

  1. Download the modis_lst mapset and unzip it within NC location
  2. t.vect.observe.strds input=schools strds=LST_Day_monthly output=LST_schools vector_output=LST_schools columns=LST
  3. g.gui.tplot stvds=LST_schools cats=1 attr=LST
  4. See plot

Expected behavior
Y axis values should be ordered correctly so the plot would show the actual fluctuation.

System description:

GRASS version: 8.4.0dev                                                         
Code revision: dec42666ca                                                       
Build date: 2024-04-13                                                          
Build platform: x86_64-pc-linux-gnu                                             
GDAL: 3.7.1                                                                     
PROJ: 9.2.1                                                                     
GEOS: 3.12.0                                                                    
SQLite: 3.42.0                                                                  
Python: 3.11.6                                                                  
wxPython: 4.2.1                                                                 
Platform: Linux-6.5.0-28-generic-x86_64-with-glibc2.38

@lucadelu any hints?

@veroandreo veroandreo added the bug Something isn't working label Apr 22, 2024
@lucadelu
Copy link
Contributor

No, I don't have any idea.

I these days I have no time to check it, I hope in the next weeks.

@echoix
Copy link
Member

echoix commented Apr 23, 2024

Without knowing anything about the implementation, I can think of two other reasons that could do that, to check if it's what happening:

  • The y axis labels on the graph come from a categorical variable, so they don't have a position. So they aren't a number, they would be a string
  • The labels are trunctatad, and you only see the end of the string

@veroandreo veroandreo added GUI wxGUI related temporal Related to temporal data processing labels Apr 23, 2024
@veroandreo
Copy link
Contributor Author

Without knowing anything about the implementation, I can think of two other reasons that could do that, to check if it's what happening:

  • The y axis labels on the graph come from a categorical variable, so they don't have a position. So they aren't a number, they would be a string

This is what I suppose too. The y value seems to be obtained here: https://github.com/OSGeo/grass/blob/f8115df1219e784a7136e7609f4c9bb16d928e2f/gui/wxpython/tplot/frame.py#L693C25-L695C29 but I'm not sure how to test it

@echoix
Copy link
Member

echoix commented Apr 24, 2024

Since I suspect something wrong with type handling, I would place a breakpoint and step through it, but I won't be on a computer for the week. I would look if the int(cat) is correct, and if the data structure represents correctly what we wanted (ie: it gets the elements we want), and what branch conditions are taken. (Make sure that it is the good lines we are investigating).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GUI wxGUI related temporal Related to temporal data processing
Projects
None yet
Development

No branches or pull requests

3 participants