-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
animate ignores options to show that are passed up from the plot command #7981
Comments
comment:1
Attachment: trac-7981-show_options.patch.gz |
Author: Jason Grout |
comment:4
Bill and Karl-Dieter, You two might be interested in this. Karl-Dieter, you wrote the original code that passed show options around, I believe. I just made the consolidation happen in .save() instead of .show(). |
comment:5
This fixes #7524. |
comment:6
Umm... I find that unlikely, though I may have broken something inadvertently. |
comment:7
Doctesting on plot.py results in 2 errors: {{[ File "/home/timdumol/sage-4.3.1.alpha0/devel/sage-ref/sage/plot/plot.py", line 1925: File "/home/timdumol/sage-4.3.1.alpha0/devel/sage-ref/sage/plot/plot.py", line 1930: 1 items had failures: |
Reviewer: Tim Dumol |
comment:8
Here is another effect of this, I think:
does not save a graph with aspect ratio 1. |
Changed author from Jason Grout to Jason Grout, Andrey Novoseltsev |
comment:9
I have just wrote a patch fixing the issue for I have changed call parameters to |
comment:10
Made it possible to apply the new patch after #10291 (which is now positively reviewed). |
comment:11
For the buildbot Apply trac-7981-save_ignores_preset_plotting_options.patch |
Changed reviewer from Tim Dumol to Tim Dumol, Marshall Hampton |
comment:12
This seems to work, and all doctests in the module plot (not just the file) pass. Sadly it didn't also fix #10244, so I will try to figure that out if I can. Positive review. |
comment:13
Just out of curiosity, what is the 'backward-incompatible' change you mention? Which extra positional arguments - like dpi? (Though Jason also got rid of that - I wonder why?) I guess I mean to ask whether this is a good such change; usually there is a deprecation period. After all, doctests catch very few of our use cases :) What is wrong with the usual As for Also, this needs a doctest (it's in the original patch) to show that animate options actually work, at least in theory (if one looked at it and ran the optional tests). So... needs work. Sorry :( |
Changed reviewer from Tim Dumol, Marshall Hampton to Tim Dumol, Marshall Hampton, Karl-Dieter Crisman |
reviewer patch |
comment:21
Attachment: trac_7981-reviewer.patch.gz Just an update - apparently
does not obey the optional test, for it created a new file (I must have ImageMagick!). We don't create non-temp new files in doctests, though, so this had to be changed. New reviewer patch fixes this as well, maintains positive review. Should not affect the plot patches which depend on this. |
comment:22
Maybe you should document in the file what you just said in your comment. Also make it clear why the test is tagged optional. |
comment:23
Hmm, but in many places in this file it says why such things are optional. In fact, earlier in the same docstring the first occurrence of
as well as several lines later
so hopefully one wouldn't need to do it a third time in three paragraphs. Especially since it's a Also, the actual issue with creating a file I have posted to sage-devel about; it's not 100% clear to me that this is a bug. It just happened to have a bad effect here, which I changed from Andrey's patch. But it's orthogonal to the ticket. So putting back to 'needs review'. I hope you will agree with me that this is in fact still worthy of positive review. Now, of course there is in the doctesting framework the issue that one can do optional tests with only certain keywords, so if one has |
comment:24
Replying to @kcrisman:
Personally, I would write it a third time. On the other hand, I don't care too much. So if you feel like you're happy with the patch as-is, then that's fine for me. |
comment:25
Yes, I am. This issue is pretty important, and the other issue is somewhat orthogonal. I've opened another ticket for the issue about the optional keyword - this is now #10655. |
comment:26
'This issue' meaning this ticket itself, of course :-) |
comment:27
Please specify which patches have to be applied. |
comment:28
Please apply trac-7981-save_ignores_preset_plotting_options.patch and trac_7981-reviewer.patch |
comment:30
Replying to @jdemeyer:
Just FYI, this was already noted in comment 19. |
Merged: sage-4.6.2.alpha2 |
This animate command shouldn't ignore the options to show() that are passed through by the plot command (here the options are ymin and ymax):
Thanks to Johann Myrkraverk Oskarsson for reporting this.
CC: @sagetrac-wcauchois
Component: graphics
Author: Jason Grout, Andrey Novoseltsev
Reviewer: Tim Dumol, Marshall Hampton, Karl-Dieter Crisman
Merged: sage-4.6.2.alpha2
Issue created by migration from https://trac.sagemath.org/ticket/7981
The text was updated successfully, but these errors were encountered: