sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.37k stars 466 forks source link

Implement plots with logarithmic scale #4529

Closed 0d90674f-05eb-4b9d-9cb6-7d583bd8b339 closed 12 years ago

0d90674f-05eb-4b9d-9cb6-7d583bd8b339 commented 15 years ago

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:

import pylab
p=plot(x,marker='.')
f=pylab.figure()
f.gca().set_xscale('log')
p.save(figure=f)

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:

  1. Make plot() detect if the figure changes the scales and modify the adaptive algorithm and the axis codes accordingly
  2. Create a kwarg to tell plot() to implement the scale-change internally
  3. Create other functions to use loglog(), semilogx() and semilogy()
  4. Many (or all) of the above together, since they aren't mutually exclusive

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

kcrisman commented 12 years ago
comment:42

I had thought about it. My decision was to silently ignore this error because it is not fatal in any way and we handle it properly (i.e. we ignore it and do the right thing).

Edit: This seems to be the same behavior as in matplotlib.

Okay, just asking. Maybe this should be documented (that is, explained that it's ok that no error is raised).

Well, except for subplot, the rest of the arguments are alphabetically arranged. :) Personally, I find it quite hard to find out where a particular function or argument is present in a typical Sage code. There is no particular manner in which the functions are arranged. Especially in several thousand line files like graphics.py it becomes hard to scroll around and edit code.

Oh yeah, it's REALLY hard to find stuff - you just have to get used to it. Ok.

I will add some more.

Great.

Yes. I have no idea what it was for. It is dead code, so I removed it.

Excellent.

If the API changes (which seems unlikely to me), then the fix will be very easy too.

I think kini explained this sufficiently in comment:41. I don't care which way it's done.

  • I wonder about the not setting of the spines outward when the axes shouldn't cross. Here is an example which serves the point:

I will have to see how to handle this. Messing around with the spines was one of the primary reasons why setting scale wasn't working - the "converting masked to int" error.

I see. It would be good to have consistency, since we went to some trouble to make them not cross any more.

I think it is up to the user to either change their range, or their base, or provide custom ticks.

Ah! You would think so. But we actually raise an error in the current code in precisely this situation. Presumably the code would be easy to just reuse?

But even with all of these comments, and waiting for the post-poll patch, fantastic job on this. Someone had to come along to finally wrap this for us, it's been requested zillions of times, and this is very worth the effort, thank you so much.

Thanks. I needed it for my own research! :)

Always good to have a good motivator! I've found that using things in class or for some random voting theory thing has ... enhanced my motivation to work on a topic.

Looking forward to seeing the global functions.

ppurka commented 12 years ago
comment:43

Replying to @kini:

Oh, I didn't mean to prevent \\mathdefault from coming into the string at all. I meant to just specifically remove the substring \\mathdefault (say with .replace("\\mathdefault","") or something).

indeed, the replace seems much better. Thanks.

ppurka commented 12 years ago

Attachment: trac_4529-check_for_single_tick.patch.gz

apply to devel/sage

ppurka commented 12 years ago

Description changed:

--- 
+++ 
@@ -15,6 +15,13 @@
 ../../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/10655557/trac_12974-whitespace_cleanup.patch.gz
 ../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642607/trac_4529-add_logscale_to_Graphics.2.patch.gz
+../../sage -b
+```
+
+Optionally, also apply patch which checks that there are enough ticks when using log scale, but which makes us lose some functionality.
+
+```
+../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642606/trac_4529-check_for_single_tick.patch.gz
 ../../sage -b
ppurka commented 12 years ago
comment:44

The following are the changes in the latest patches:

  1. labeling of minor ticks was flaky; it is fixed now.
  2. added several examples to show()
  3. fixed a problem in axes position of the matplotlib() function when custom xmax, xmin, etc were passed. Try this plot (without these patches) and then try with these patches :)
plot(x).show(xmin=1, xmax=-1)
  1. there is an optional patch where we check for a single tick. this is tricky and I don't know a good and complete solution. Moreover, it makes most of the functions like 'arc, disk, etc' stop "just working" with log scale. It will be good if you have a better idea how to check for ticks which don't affect these functions too. We can't use xmin, xmax, etc to determine ticks because some of them might well be negative and matplotlib will neglect these values.
ppurka commented 12 years ago

Attachment: trac_4529-add_logscale_to_Graphics.2.patch.gz

apply to devel/sage

kcrisman commented 12 years ago
comment:45

Sorry for the delay - I only scheduled a couple hours of work this evening. Tomorrow I will have more time.

Hey, I just had an idea. Maybe this ticket should be only about the ticket description, and then another ticket for adding the "shortcut" commands like plot_loglog or whatever. In which case the current patches might be enough! (After much testing, of course.) What do you think?

More comments:

sage: G.show(scale=('loglog', 5)) # plots
sage: G.show(scale=('loglog', 4)) # plots
sage: G.show(scale=('loglog', 6)) # error

because it really depends on the minor ticks as well. I'm not sure whether having minor ticks should count as "having two ticks", especially in the relatively obscure-looking log plot situation. I'm not even sure why

sage: G.show(scale=('loglog', 2)) 

works, since there is only one tick on the left!

sage: p = list_plot(range(1, 10), plotjoined=True)
sage: p.show(scale='loglog',base=2)

doesn't show any minor ticks. Is that just how LogLocator works, or is there something wrong?

Obviously at this point we are getting close to nitpicking. I'll try more tomorrow.

ppurka commented 12 years ago
comment:46

Replying to @kcrisman:

Sorry for the delay - I only scheduled a couple hours of work this evening. Tomorrow I will have more time.

No problems. It is better to have a good implementation than to hurry through a bad one.

Hey, I just had an idea. Maybe this ticket should be only about the ticket description, and then another ticket for adding the "shortcut" commands like plot_loglog or whatever. In which case the current patches might be enough! (After much testing, of course.) What do you think?

Actually, there is zero change to be done to the code in plot or list_plot, except to add some examples. The only change that the additional patch will do is make very thin (one-liners) wrappers which defines the plot_* and list_plot_* wrappers and pass the correct scale option to plot and list_plot. The current consensus from the poll seems to favor this syntax. In view of this, the patch attachment: trac_4529-add_docs_eg_to_some_user_facing_functions.patch requires only a renaming of the functions, and some extra examples.

  • We'll eventually want to add some examples (or replace some of these) with the plot(...,scale='loglog') format ones. And definitely to add some to the file plot.py, since that is where a lot of people will look first for how to get this. But that can wait until the end, I'll be happy to do that in a reviewer patch.

We can add exactly similar examples to plot() and list_plot(). Currently, since the function is Graphics.show(), I decided to write it as show(scale=...) instead of plot(scale=...) since the former is more pertinent.

  • Catching this thing about the flipped xmin/xmax and friends is just a bonus - again, great catch and solution.
  • As to the optional patch, I will think about this some more tomorrow. I do note that things still "work". For the example you removed G, the example you removed did in fact work, for instance.

Yes I am aware that the examples I provided work. But most of the examples in the docs of those functions (arc, disk, contour_plot, etc) do not work out of the box, and we get the "too few ticks" error.

I'm not sure whether having minor ticks should count as "having two ticks", especially in the relatively obscure-looking log plot situation. I'm not even sure why

sage: G.show(scale=('loglog', 2)) 

works, since there is only one tick on the left!

Yes. That's why I said that the tick checking function is not robust and I also don't know how to make it robust.

  • Along those lines, your example (changed)
sage: p = list_plot(range(1, 10), plotjoined=True)
sage: p.show(scale='loglog',base=2)

doesn't show any minor ticks. Is that just how LogLocator works, or is there something wrong?

The minor ticks are generated by passing in multiples of 1/base to the subs parameter of LogLocator. So, for base 10, you will have ticks at say, 0.1*10^-1, 0.2*10^-1, ..., 0.9*10^-1, 10^-1. This is a typical way how log plots are drawn in all programs (pyplot.loglog(), matlab, mathematica, etc). For base=2 you can have only one tick 1/2*2^i but this is a major tick at 2^(i-1). So, you will always see only one major tick and no minor ticks.

Obviously at this point we are getting close to nitpicking. I'll try more tomorrow.

Thanks a lot for the feedback. I am sure I have missed something, so I look forward to it. :)

kcrisman commented 12 years ago
comment:47

Actually, there is zero change to be done to the code in plot or list_plot, except to add some examples. The only change that the additional patch will do is make very thin (one-liners) wrappers which defines the plot_* and list_plot_* wrappers and pass the correct scale option to plot and list_plot. The current consensus from the poll seems to favor this syntax. In view of this, the patch attachment: trac_4529-add_docs_eg_to_some_user_facing_functions.patch requires only a renaming of the functions, and some extra examples.

Oh, I didn't realize that that patch actually already implemented that - I hadn't had time to look at the patches until you had already said which patches to apply! Yes, I should be able to rebase/rename that well for our purposes, just adding a few more examples which occur fairly frequently.

We can add exactly similar examples to plot() and list_plot(). Currently, since the function is Graphics.show(), I decided to write it as show(scale=...) instead of plot(scale=...) since the former is more pertinent.

Of course.

  • As to the optional patch, I will think about this some more tomorrow. I do note that things still "work". For the example you removed G, the example you removed did in fact work, for instance.

Yes I am aware that the examples I provided work. But most of the examples in the docs of those functions (arc, disk, contour_plot, etc) do not work out of the box, and we get the "too few ticks" error.

But they 'work', just not with the log scale, right?

I'm not sure whether having minor ticks should count as "having two ticks", especially in the relatively obscure-looking log plot situation. I'm not even sure why

sage: G.show(scale=('loglog', 2)) 

works, since there is only one tick on the left!

Yes. That's why I said that the tick checking function is not robust and I also don't know how to make it robust.

Haha. Well, I spent about a half-hour looking in depth at the code for matplotlib.ticker.LogLocator and have decided it is nearly impossible. There will very often, especially for base=2 and friends, be ticks in the locator which are outside of the viewing range.

So there are ways to get some of this information... yuck. I may have something for this later today. I've been looking at it for over an hour and, at least for plots with only positive data, I think I have something. For ones with negative data it would be much more ugly and maybe not worth it.

By the way, I get

sage: sage: disk((0,0), 1, (0, 3*pi/2)).show(scale='semilogx',base=2)
/Users/.../sage-5.1.beta0/local/lib/python2.7/site-packages/matplotlib/axes.py:1114: UserWarning: aspect is not supported for Axes with xscale=log, yscale=linear
  % (xscale, yscale))

when I try something that has an aspect ratio defined (disk, etc.)

The minor ticks are generated by passing in multiples of 1/base to the subs parameter of LogLocator. So, for base 10, you will have ticks at say, 0.1*10^-1, 0.2*10^-1, ..., 0.9*10^-1, 10^-1. This is a typical way how log plots are drawn in all programs (pyplot.loglog(), matlab, mathematica, etc). For base=2 you can have only one tick 1/2*2^i but this is a major tick at 2^(i-1). So, you will always see only one major tick and no minor ticks.

I understood that, but didn't think through the implications for base=2. By the way, maybe changing

srange(base_inv, 1+base_inv, base_inv)

to

srange(2*base_inv, 1, base_inv)

would be useful, so that minor and major ticks don't overlap... probably doesn't matter, but could be ok.

kcrisman commented 12 years ago
comment:48

So I've come up with a solution. I'll probably post stuff in a little while. Here's a typical example.

sage: P = plot(x^2,(x,1,8),scale='loglog'); P
ValueError: Either expand the range of the independent variable to allow two different integer powers of your `base`, or change your `base` to a smaller number.
sage: P.show(xmax=10)

Some more food for thought.

sage: P = plot(x^2,(x,1,8),scale='loglog', base=1.5); P

This is because matplotlib has

        else:
            if usetex:
                s = r'$%s%d^{%d}$'% (sign_string, b, nearest_long(fx))
            else:
                s = r'$\mathdefault{%s%d^{%d}}$'% (sign_string, b,
                                                   nearest_long(fx))

which uses decimal formatting, but of course that only makes sense for integer bases. I feel like this is a bug in mpl; what do you think? Anyway, I am hesitant to patch our matplotlib just for this use case, though it should be a new ticket, I think. The same thing happens with base=3/2, unsurprisingly.

sage: G =  plot_vector_field((e^x,e^(x+y)),(x,0.1,10),(y,0.1,10),scale=('loglog', 2))
sage: H = plot(x^2,(x,0,10),scale='linear')
sage: G+H

At least originally you thought this should raise an error.

kcrisman commented 12 years ago
comment:49

Almost done with my changes! Here are things that definitely have to be decided or fixed.

Other points.

        sage: yl = [2**k for k in range(10)]  
        sage: list_plot(yl, scale='semilogy')       # fine
        sage: list_plot(yl, scale='loglog')         # horiz. axis weird, no points
        sage: list_plot_loglog(yl, base=2) # same weird

I assume this is because there is automatically a change to the list of tuples zipped with range(n), so that there is always a zero involved in the horizontal axis. Here is the real problem.

point([(0,1),(1,2),(2,3),(3,4),(4,5)],scale='semilogx',base=2) # doesn't work

What do you think the "correct" behavior is here?

I fixed a bunch of minor doc issues. I also added a lot of


::

between doctests which were meant to be viewed, because otherwise one will not be able to evaluate these plots in the live documentation (this is standard).

kcrisman commented 12 years ago

Attachment: trac_4529-add-log-scale.patch.gz

kcrisman commented 12 years ago

Attachment: trac_4529-single-tick.patch.gz

kcrisman commented 12 years ago

Attachment: trac_4529-docs-and-funcs.patch.gz

kcrisman commented 12 years ago

Attachment: trac_4529-more-doc.patch.gz

kcrisman commented 12 years ago
comment:50

Okay, ppurka, ready for your comments on this whole mess. I've uploaded refreshed patches of yours, as well as a new one of doc fixes. The three issues (non-integer base, adding, list plots with list input) remain, so I am not putting "needs review" yet.

Patchbot: Apply trac_4529-add-log-scale.patch, trac_4529-single-tick.patch, trac_4529-docs-and-funcs.patch, and trac_4529-more-doc.patch.

kcrisman commented 12 years ago

Description changed:

--- 
+++ 
@@ -2,9 +2,13 @@

 Depends on #12974.

-Apply [attachment: trac_4529-add_logscale_to_Graphics.2.patch](https://github.com/sagemath/sage-prod/files/10642607/trac_4529-add_logscale_to_Graphics.2.patch.gz) and a patch to be determined.
+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-more-doc.patch](https://github.com/sagemath/sage-prod/files/10642611/trac_4529-more-doc.patch.gz)

-OR
+Old instructions:

 Apply the following patches in the specified order. `SAGE_ROOT` is the directory where the sage installation is present.
kcrisman commented 12 years ago

Changed author from Punarbasu Purkayastha to Punarbasu Purkayastha, Karl-Dieter Crisman

ppurka commented 12 years ago
comment:51

arc((2,3), 2, 1, angle=pi/5, sector=(0,pi/2)).show(scale='loglog', base=2)
arc((2,3), 2, 1, sector=(0,pi/2)).show(scale='loglog', base=2)
ppurka commented 12 years ago

Description changed:

--- 
+++ 
@@ -7,6 +7,7 @@
 * [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-more-doc.patch](https://github.com/sagemath/sage-prod/files/10642611/trac_4529-more-doc.patch.gz)
+* [attachment: trac_4529-typo_fixes.patch](https://github.com/sagemath/sage-prod/files/10642612/trac_4529-typo_fixes.patch.gz)

 Old instructions:

@@ -18,14 +19,11 @@
 ../../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/10655557/trac_12974-whitespace_cleanup.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642607/trac_4529-add_logscale_to_Graphics.2.patch.gz
-../../sage -b
-```
-
-Optionally, also apply patch which checks that there are enough ticks when using log scale, but which makes us lose some functionality.
-
-```
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642606/trac_4529-check_for_single_tick.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/10642611/trac_4529-more-doc.patch.gz
+../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642612/trac_4529-typo_fixes.patch.gz
 ../../sage -b
ppurka commented 12 years ago
comment:52

Added the typo fixes. I am good with your changes. So, it requires your review (as if you haven't reviewed enough already!) ;)

ppurka commented 12 years ago

Changed reviewer from Karl-Dieter Crisman to Karl-Dieter Crisman, Punarbasu Purkayastha

ppurka commented 12 years ago
comment:53

Forgot about noninteger bases: I think we should discourage the users from using them.

ppurka commented 12 years ago

Changed work issues from convenience functions to add warnings to list_plot and non-integer bases

kcrisman commented 12 years ago
comment:55

Thanks for the latest work!

In your latest patch, I see things like

The `"semilogx"` scale

But this will typeset as a LaTeX style thing, which is wrong. Try

The ``"semilogx"`` scale

and then all should be well with those. Easy enough to update on the last patch.

Forgot about noninteger bases: I think we should discourage the users from using them.

Hmm, ok. In that case maybe you can update your latest patch to still do the "e" example but make it really clear that this is (currently) not intended input? I don't want to actually check for integers, though; presumably in some contexts one could want 1.5. Do you think I should report this upstream to mpl?

list_plot does seem to behave a bit weird sometimes. But if we use plotjoined=True, then it works fine. Thanks for figuring out where it goes awry. I will have a look into it. Should the fix go into a separate ticket?

As long as we document that things can screw up on the x-axis for list_plot if you don't use plotjoined=True. That can go in your patch update too :)

If we fix disk, then we need to weed out all the cases for the rest of the commands in sage.plot.*

True. And I noticed the parametric business later on, good catch. I think this might be worth doing. Again, I'm not really worried - we had some fun laughing at the plots one gets from loglog plots of arcs and circles here. But anyway.

It seems matplotlib prefers log over linear and sets everything to log.

Oh, that explains what I saw. I have to say it was very weird.

I await the latest version of the last (?) patch.

ppurka commented 12 years ago
comment:56

Yes. Working on a lost patch. It should be up in a short while.

ppurka commented 12 years ago
comment:57

I found my "lost" patch. phew

ppurka commented 12 years ago

Changed work issues from add warnings to list_plot and non-integer bases to none

ppurka commented 12 years ago
comment:58

Reporting it to mpl is probably the right way to handle noninteger bases. They can check on their end, and change the labeling to %.2f^{%d} if a noninteger base is detected.

kcrisman commented 12 years ago
comment:59

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.

Very minor request - on an update of your patch, perhaps.

Note: 

- Although it is possible to provide a noninteger ``base``, the 

maybe that could be in a standard

.. note

   Although it is possible ...

which would render nicely in the built documentation.

The

.. warning:: 

should have a blank line after it.

Here's the complete list from sage -docbuild reference html.

/Users/.../sage-5.1.beta0/local/lib/python2.7/site-packages/sage/plot/graphics.py:docstring of sage.plot.graphics.Graphics.axes_color:3: WARNING: Bullet list ends without a blank line; unexpected unindent.
/Users/.../sage-5.1.beta0/local/lib/python2.7/site-packages/sage/plot/graphics.py:docstring of sage.plot.graphics.Graphics.axes_color:5: ERROR: Unexpected indentation.
/Users/.../sage-5.1.beta0/local/lib/python2.7/site-packages/sage/plot/plot.py:docstring of sage.plot.plot:89: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/Users/.../sage-5.1.beta0/local/lib/python2.7/site-packages/sage/plot/plot.py:docstring of sage.plot.plot:36: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/Users/.../sage-5.1.beta0/local/lib/python2.7/site-packages/sage/plot/plot.py:docstring of sage.plot.plot:65: WARNING: Bullet list ends without a blank line; unexpected unindent.
/Users/.../sage-5.1.beta0/local/lib/python2.7/site-packages/sage/plot/plot.py:docstring of sage.plot.plot:67: ERROR: Unexpected indentation.

Unfortunately it's too late now for me to properly test everything again - time for bed - but I am not really too concerned, given the stuff I've been trying all along. If you are able to deal with these formatting issues, I'd be grateful, and even if I have to deal with it slowly we should certainly be ready for positive review by the end of the week. Hopefully by tomorrow!

ppurka commented 12 years ago

Attachment: trac_4529-typo_fixes.patch.gz

ppurka commented 12 years ago
comment:60

updated the last patch. It should fix the rest of the warnings.

.../sage-5.1beta0/devel/sage» ../../sage -b && ../../sage -docbuild reference html

----------------------------------------------------------
sage: Building and installing modified Sage library files.

Installing c_lib
scons: `install' is up to date.
Updating Cython code....
setup.py:650: UserWarning: could not find dependency <vector> included in /home/punarbasu/Installations/sage-5.1beta0/local/lib/python/site-packages/Cython/Includes/libcpp/vector.pxd. I will assume it is a system C/C++ header.
  warnings.warn(msg+' I will assume it is a system C/C++ header.')
setup.py:650: UserWarning: could not find dependency <string> included in /home/punarbasu/Installations/sage-5.1beta0/local/lib/python/site-packages/Cython/Includes/libcpp/string.pxd. I will assume it is a system C/C++ header.
  warnings.warn(msg+' I will assume it is a system C/C++ header.')
Executing 0 commands (using 0 threads)
Time to execute 0 commands: 0.0459749698639 seconds
Finished compiling Cython code (time = 0.499665021896 seconds)
running install
running build
running build_py
copying sage/plot/plot.py -> build/lib.linux-x86_64-2.7/sage/plot
running build_ext
warning: Replacing library search directory in linker command:
  "/home/punarbasu/Installations/sage-5.0.rc0/local/lib" -> "/home/punarbasu/Installations/sage-5.1beta0/local/lib"

Executing 0 commands (using 0 threads)
Time to execute 0 commands: 0.00115895271301 seconds
Total time spent compiling C/C++ extensions:  0.0369729995728 seconds.
running install_lib
copying build/lib.linux-x86_64-2.7/sage/plot/plot.py -> /home/punarbasu/Installations/sage-5.1beta0/local/lib/python2.7/site-packages/sage/plot
byte-compiling /home/punarbasu/Installations/sage-5.1beta0/local/lib/python2.7/site-packages/sage/plot/plot.py to plot.pyc
running install_egg_info
Removing /home/punarbasu/Installations/sage-5.1beta0/local/lib/python2.7/site-packages/sage-0.0.0-py2.7.egg-info
Writing /home/punarbasu/Installations/sage-5.1beta0/local/lib/python2.7/site-packages/sage-0.0.0-py2.7.egg-info

real    0m1.513s
user    0m1.202s
sys 0m0.206s
sphinx-build -b html -d /home/punarbasu/Installations/sage-5.1beta0/devel/sage/doc/output/doctrees/en/reference    /home/punarbasu/Installations/sage-5.1beta0/devel/sage/doc/en/reference /home/punarbasu/Installations/sage-5.1beta0/devel/sage/doc/output/html/en/reference
Running Sphinx v1.1.2
loading pickled environment... done
loading intersphinx inventory from /home/punarbasu/Installations/sage-5.1beta0/devel/sage/doc/common/python.inv...
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] sage/plot/plot                                        
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
WARNING: dvipng command 'dvipng' cannot be run (needed for math display), check the pngmath_dvipng setting
writing output... [100%] sage/plot/plot                                         
writing additional files... genindex py-modindex search
copying static files... done
dumping search index... done
dumping object inventory... done
build succeeded, 1 warning.
Build finished.  The built documents can be found in /home/punarbasu/Installations/sage-5.1beta0/devel/sage/doc/output/html/en/reference
kcrisman commented 12 years ago

Attachment: trac_4529-final-fixes.patch.gz

kcrisman commented 12 years ago

Description changed:

--- 
+++ 
@@ -8,8 +8,9 @@
 * [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-more-doc.patch](https://github.com/sagemath/sage-prod/files/10642611/trac_4529-more-doc.patch.gz)
 * [attachment: trac_4529-typo_fixes.patch](https://github.com/sagemath/sage-prod/files/10642612/trac_4529-typo_fixes.patch.gz)
+* [attachment: trac_4529-final-fixes.patch](https://github.com/sagemath/sage-prod/files/10642613/trac_4529-final-fixes.patch.gz)

-Old instructions:
+Alternate instructions:

 Apply the following patches in the specified order. `SAGE_ROOT` is the directory where the sage installation is present.

@@ -24,6 +25,7 @@
 ../../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/10642611/trac_4529-more-doc.patch.gz
 ../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642612/trac_4529-typo_fixes.patch.gz
+../../sage -hg qimport -P https://github.com/sagemath/sage/files/ticket4529/trac_4529-final_fixes.patch.gz
 ../../sage -b
kcrisman commented 12 years ago
comment:61

Patchbot:

Apply

kcrisman commented 12 years ago
comment:62

Okay, this morning I had time to make one final formatting change and add a few more tests, and change some that would not have looked right. In particular I put the whole warning thing into one warning block - cosmetic, but useful.

I think there are probably a few more corner case things we haven't thought of, but the functionality is now robust enough and well-documented enough in the corner cases we did discover that it's ready for positive review. Although some disagree with this philosophy, my opinion is that for a project like Sage it is better to add new functionality that is 99% ready and then provide quick fixes to minor issues that remain; we simply don't have the resources to spend days trying to break it. If you're happy with it, I'm happy with it. What do you think?

ppurka commented 12 years ago
comment:63

I am happy with the changes. :)

NB: The patchbot won't work, because it needs to apply the dependency ticket first.

kini commented 12 years ago
comment:64

The patchbot will work - I will make it work!

Patchbot, listen carefully! apply trac_4529-add-log-scale.patch trac_4529-single-tick.patch trac_4529-docs-and-funcs.patch trac_4529-more-doc.patch trac_4529-typo_fixes.patch trac_4529-final-fixes.patch !!!

jasongrout commented 12 years ago
comment:65

I was hoping you'd say: "Patch bot, these are the files you are looking for" (I hope that space makes this comment really just a comment!) (and, uh, that was a star wars reference...)

ppurka commented 12 years ago
comment:66

Replying to @jasongrout:

I was hoping you'd say: "Patch bot, these are the files you are looking for" (I hope that space makes this comment really just a comment!) (and, uh, that was a star wars reference...)

Ha ha! The bot listens only to kini!

kini commented 12 years ago
comment:67

You don't actually have to address the patchbot to make it understand - you just need the word "apply" followed by the correct patch names in the correct order in plain text, possibly on the same line, I don't remember. I just mention the patchbot so people don't wonder what the cryptic comment with patch filenames in it is about.

kcrisman commented 12 years ago

Description changed:

--- 
+++ 
@@ -7,7 +7,7 @@
 * [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-more-doc.patch](https://github.com/sagemath/sage-prod/files/10642611/trac_4529-more-doc.patch.gz)
-* [attachment: trac_4529-typo_fixes.patch](https://github.com/sagemath/sage-prod/files/10642612/trac_4529-typo_fixes.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-final-fixes.patch](https://github.com/sagemath/sage-prod/files/10642613/trac_4529-final-fixes.patch.gz)

 Alternate instructions:
@@ -24,7 +24,7 @@
 ../../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/10642611/trac_4529-more-doc.patch.gz
-../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642612/trac_4529-typo_fixes.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/files/ticket4529/trac_4529-final_fixes.patch.gz
 ../../sage -b
kcrisman commented 12 years ago

Changed dependencies from #12974 to #12810, #12605, #12974

kcrisman commented 12 years ago
comment:68

Attachment: trac_4529-typo_fixes-rebase.patch.gz

Luckily I only had to rebase one of these, due to some fuzz which the release manager doesn't always like. Otherwise this is good to go! Note the long list of dependencies, only so that all patches apply properly on 5.1.beta1.

Positive review!

Patchbot, apply apply trac_4529-add-log-scale.patch trac_4529-single-tick.patch trac_4529-docs-and-funcs.patch trac_4529-more-doc.patch trac_4529-typo_fixes-rebase.patch trac_4529-final-fixes.patch

ppurka commented 12 years ago

Description changed:

--- 
+++ 
@@ -16,10 +16,10 @@

cd SAGE_ROOT/devel/sage -../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10655553/trac_12974-fix_graphics_attributes.patch.gz +../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10655559/trac_12974-fix_graphics_attributes-rebase.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/10655557/trac_12974-whitespace_cleanup.patch.gz +../../sage -hg qimport -P https://github.com/sagemath/sage/files/ticket12974/trac_12974-whitespace-rebase.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

ppurka commented 12 years ago

Description changed:

--- 
+++ 
@@ -19,7 +19,7 @@
 ../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10655559/trac_12974-fix_graphics_attributes-rebase.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/files/ticket12974/trac_12974-whitespace-rebase.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/10642610/trac_4529-docs-and-funcs.patch.gz
ppurka commented 12 years ago

Description changed:

--- 
+++ 
@@ -25,7 +25,7 @@
 ../../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/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/files/ticket4529/trac_4529-final_fixes.patch.gz
+../../sage -hg qimport -P https://github.com/sagemath/sage-prod/files/10642613/trac_4529-final-fixes.patch.gz
 ../../sage -b
ppurka commented 12 years ago

Description changed:

--- 
+++ 
@@ -16,6 +16,8 @@

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/10655559/trac_12974-fix_graphics_attributes-rebase.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

ppurka commented 12 years ago

Description changed:

--- 
+++ 
@@ -18,7 +18,7 @@
 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/10655559/trac_12974-fix_graphics_attributes-rebase.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
ppurka commented 12 years ago
comment:73

Patchbot apply: trac_4529-add-log-scale.patch trac_4529-single-tick.patch trac_4529-docs-and-funcs.patch trac_4529-more-doc.patch trac_4529-typo_fixes-rebase.patch trac_4529-final-fixes.patch