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

Missing option 'use_dates' with PlotPanel.update_line() function #54

Open
Appryhandsome opened this issue Dec 11, 2022 · 1 comment
Open

Comments

@Appryhandsome
Copy link

Appryhandsome commented Dec 11, 2022

Sorry, I have zero experience in reporting issues.

But I believe I've found an error > if you succesfully draw a plot with wxmplot.PlotPanel.Plot() using the use_dates=True option and then you want to later update it with wxmplot.PlotPanel.update_line() and update_limits=True you'll get an error:

TypeError: '>' not supported between instances of 'float' and 'datetime.datetime'

The error I believe stems from config.py the set_viewlimits() function. More specifically I think it goes wrong here:

                        else:
                            limits = [min(limits[0], min(x)),
                                      max(limits[1], max(x)),
                                      min(limits[2], min(y)),
                                      max(limits[3], max(y))]

Which is the piece of code that will throw a TypeError if x contains datetime.datetime objects.

Hope this helps your team to further improve the code. If you need me to write a full piece of code that throws the error when you run it let me know. If the error is surely on my part due to wrong usage just mention so and I'll find my own solution.

Thnx!

@newville
Copy link
Owner

@Appryhandsome OK, thanks. I agree with the initial assessment that this probably where the problem is. I will look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants