Closed 0d90674f-05eb-4b9d-9cb6-7d583bd8b339 closed 12 years ago
Attachment: trac_4529-docs-and-funcs.2.patch.gz
Attachment: trac_4529-typo_fixes-rebase.2.patch.gz
I noticed that the case when scale
is a list wasn't handled for changing aspect ratio in the new code. It's a non-fatal case, but it is nice to make sure that user doesn't get warnings from mpl. Updated two of the patches. Changes can be seen here.
Patchbot apply: trac_4529-add-log-scale.patch trac_4529-single-tick.patch trac_4529-docs-and-funcs.2.patch trac_4529-more-doc.patch trac_4529-typo_fixes-rebase.2.patch trac_4529-final-fixes.patch
Description changed:
---
+++
@@ -5,9 +5,9 @@
Apply
* [attachment: trac_4529-add-log-scale.patch](https://github.com/sagemath/sage-prod/files/10642608/trac_4529-add-log-scale.patch.gz)
* [attachment: trac_4529-single-tick.patch](https://github.com/sagemath/sage-prod/files/10642609/trac_4529-single-tick.patch.gz)
-* [attachment: trac_4529-docs-and-funcs.patch](https://github.com/sagemath/sage-prod/files/10642610/trac_4529-docs-and-funcs.patch.gz)
+* [attachment: trac_4529-docs-and-funcs.2.patch](https://github.com/sagemath/sage-prod/files/10642615/trac_4529-docs-and-funcs.2.patch.gz)
* [attachment: trac_4529-more-doc.patch](https://github.com/sagemath/sage-prod/files/10642611/trac_4529-more-doc.patch.gz)
-* [attachment: trac_4529-typo_fixes-rebase.patch](https://github.com/sagemath/sage-prod/files/10642614/trac_4529-typo_fixes-rebase.patch.gz)
+* [attachment: trac_4529-typo_fixes-rebase.2.patch](https://github.com/sagemath/sage-prod/files/10642616/trac_4529-typo_fixes-rebase.2.patch.gz)
* [attachment: trac_4529-final-fixes.patch](https://github.com/sagemath/sage-prod/files/10642613/trac_4529-final-fixes.patch.gz)
Alternate instructions:
@@ -24,9 +24,9 @@
../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10655558/trac_12974-whitespace-rebased.patch.gz
../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642608/trac_4529-add-log-scale.patch.gz
../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642609/trac_4529-single-tick.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642610/trac_4529-docs-and-funcs.patch.gz
+../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642615/trac_4529-docs-and-funcs.2.patch.gz
../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642611/trac_4529-more-doc.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642614/trac_4529-typo_fixes-rebase.patch.gz
+../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642616/trac_4529-typo_fixes-rebase.2.patch.gz
../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642613/trac_4529-final-fixes.patch.gz
../../sage -b
Okay by me as long as it all still applies, as it appears you have been very careful to ensure! You really do find some good corner cases!
I'll try to rebase #12974 this morning.
Note that #12974 needs work though...
Note that #12974 needs work though...
Yes, I saw that. It looks like they are all the result of just one name-mangling change or something, though, so hopefully not a problem.
Okay, #12974 seems to be all set, so one would just have to check that this still applied on top of that.
Yuck. Lots of places it doesn't apply correctly. I'll try to take care of this now.
Every single conflict was due to whitespace (and hence probably fallout from #12974's extra patch. Grr. Patches coming up.
Wasn't the whitespace patch from #12974 removed? Why are there still conflicts?
Wasn't the whitespace patch from #12974 removed? Why are there still conflicts?
It was removed. But these patches are all based on the 'old' #12974. There would not have been conflicts if we had kept that patch.
Anyway, I just finished, so hold on a sec. It would be good for someone to look at things to make sure I did the rebasing right.
Attachment: trac_4529-patch1.patch.gz
Attachment: trac_4529-patch2.patch.gz
Attachment: trac_4529-patch3.patch.gz
Attachment: trac_4529-patch5.patch.gz
Attachment: trac_4529-patch6.patch.gz
Sorry for all the patches, but I was trying to make sure things looked the same. These are the same six patches, just in numerical number - didn't want to add more rebase suffixes.
Apply
Description changed:
---
+++
@@ -3,33 +3,12 @@
Depends on #12974.
Apply
-* [attachment: trac_4529-add-log-scale.patch](https://github.com/sagemath/sage-prod/files/10642608/trac_4529-add-log-scale.patch.gz)
-* [attachment: trac_4529-single-tick.patch](https://github.com/sagemath/sage-prod/files/10642609/trac_4529-single-tick.patch.gz)
-* [attachment: trac_4529-docs-and-funcs.2.patch](https://github.com/sagemath/sage-prod/files/10642615/trac_4529-docs-and-funcs.2.patch.gz)
-* [attachment: trac_4529-more-doc.patch](https://github.com/sagemath/sage-prod/files/10642611/trac_4529-more-doc.patch.gz)
-* [attachment: trac_4529-typo_fixes-rebase.2.patch](https://github.com/sagemath/sage-prod/files/10642616/trac_4529-typo_fixes-rebase.2.patch.gz)
-* [attachment: trac_4529-final-fixes.patch](https://github.com/sagemath/sage-prod/files/10642613/trac_4529-final-fixes.patch.gz)
-
-Alternate instructions:
-
-Apply the following patches in the specified order. `SAGE_ROOT` is the directory where the sage installation is present.
-
-```
-cd SAGE_ROOT/devel/sage
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10655304/trac_12810-rebased.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10654997/trac_12605-circle-color-graphplot-doc-rebased.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10655560/trac_12974-fix_graphics_attributes-rebase.2.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10655555/trac_12974-refactor.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10655556/trac_12974-reorder_some_arguments.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10655558/trac_12974-whitespace-rebased.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642608/trac_4529-add-log-scale.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642609/trac_4529-single-tick.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642615/trac_4529-docs-and-funcs.2.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642611/trac_4529-more-doc.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642616/trac_4529-typo_fixes-rebase.2.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642613/trac_4529-final-fixes.patch.gz
-../../sage -b
-```
+* [attachment: trac_4529-patch1.patch](https://github.com/sagemath/sage-prod/files/10642617/trac_4529-patch1.patch.gz)
+* [attachment: trac_4529-patch2.patch](https://github.com/sagemath/sage-prod/files/10642618/trac_4529-patch2.patch.gz)
+* [attachment: trac_4529-patch3.patch](https://github.com/sagemath/sage-prod/files/10642619/trac_4529-patch3.patch.gz)
+* [attachment: trac_4529-patch4.patch](https://github.com/sagemath/sage-prod/files/10642622/trac_4529-patch4.patch.gz)
+* [attachment: trac_4529-patch5.patch](https://github.com/sagemath/sage-prod/files/10642620/trac_4529-patch5.patch.gz)
+* [attachment: trac_4529-patch6.patch](https://github.com/sagemath/sage-prod/files/10642621/trac_4529-patch6.patch.gz)
---
**OLD DISCUSSION BELOW :)**
Plots seem fine still.
With respect to one minor issue - this is nothing to do with positive review, but a question for ppurka.
Compare
plot(x,(x,-1,1),xmin=1,xmax=-1)
plot(x,(x,-1,1)).show(xmin=1,xmax=-1)
with the patches (or even just first patch). I would think they should be the same (i.e., like the second one, as commented in the first patch).
Hello, sorry for not being able to participate. Currntly posting from an airport kiosk. I thought they should be the same. I will have to check if the code is only triggered from matplotlib, or if the points are sorted before the render_to_subplot
.
By the way many thanks to you (kcrisman), jason and jeroen for doing the rebasing :)
Hello, sorry for not being able to participate. Currntly posting from an airport kiosk. I thought they should be the same. I will have to check if the code is only triggered from matplotlib, or if the points are sorted before the
render_to_subplot
.
I wouldn't be surprised if they were.
Anyway, when you figure it out, open a ticket :) Have a great trip, wherever you go.
Replying to @kcrisman:
Sorry for all the patches, but I was trying to make sure things looked the same. These are the same six patches, just in numerical number
Awesome!
attachment: trac_4529-patch4.patch needs a proper commit message.
attachment: trac_4529-patch4.patch needs a proper commit message.
Huh, that happened the last time too. Sorry, I don't know how I missed that. Coming up.
Attachment: trac_4529-patch4.patch.gz
Ok, should be all set.
Merged: sage-5.2.beta1
Replying to @kcrisman:
I found my "lost" patch. phew
Good thing!
I've opened https://github.com/matplotlib/matplotlib/issues/909 for the mpl issue. Hopefully we'll hear something eventually.
ppurka:
Did we ever open a ticket for fixing this? Anyway, it's been resolved in this mpl pull request, apparently. I think that we put in a comment about how this doesn't (yet) work, so there would be something to do now that this has been done.
Attached is a patch which introduces log scale to
Graphics()
class.Depends on #12974.
Apply
OLD DISCUSSION BELOW :)
Currently plot() has no option to use logarithmic scales.
One workaround is to use matplotlib directly, with its semilogy(), semilogx() and loglog() functions, but that wouldn't produce plots with the customisations implemented in sage. Another workaround is messing with the plot figure like:
But that creates two problems:
Also, this requires the user to know how to deal with figures, which is not directly exposed by sage.
There are some possibilities to fix that:
From what I noticed, Mathematica implements the separate functions way, but it may be better to fix the issue in plot() itself and if the other functions are wanted, just make it so that they call plot() with the correct arguments
Depends on #12810 Depends on #12605 Depends on #12974
Component: graphics
Keywords: plot log scale
Author: Punarbasu Purkayastha, Karl-Dieter Crisman
Reviewer: Karl-Dieter Crisman, Punarbasu Purkayastha
Merged: sage-5.2.beta1
Issue created by migration from https://trac.sagemath.org/ticket/4529