Interested in Plotting module and GSoC 2012

84 views
Skip to first unread message

Vishesh Kumar

unread,
Mar 16, 2012, 4:04:43 PM3/16/12
to sy...@googlegroups.com
I am interested in working at the equation editor task and/or improving the plotting module, as possible projects for GSoC 2012.
I would love to know how to start out with either, and what aspects I should approach. With regard to the plotting module, it seems like a vast thing in entirety, but I don't know if we'd be required to work on all of it or choose some subset of that. In either case, I don't have much idea of the same by default, and would be grateful to receive some initial guidance, with regard to starting off.

-------------------
Regards
Vishesh Kumar

Aaron Meurer

unread,
Mar 16, 2012, 5:47:05 PM3/16/12
to sy...@googlegroups.com
For the plotting, you should look at
https://github.com/sympy/sympy/pull/673, which will hopefully be
merged soon. The work on that project would pick up there.

Aaron Meurer

> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to
> sympy+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.

krastano...@gmail.com

unread,
Mar 16, 2012, 7:07:41 PM3/16/12
to sy...@googlegroups.com
You should check the mailing list archive as a potential gsoc project
on the plotting module was discussed a number of times. A list of
things to do are present in the gsoc-ideas page as well as in the
comments on the pull request page. The code still has not been
reviewed (it is quite long and I suppose there are some antipatterns
that are not yet fixed) so it would be greatly appreciated if you can
start by reviewing it.

I was the original author of the pull request and I will be able to
help with code reviews, etc. However I will not be able to mentor this
project as I will myself be applying for another one.

Vishesh Kumar

unread,
Mar 17, 2012, 1:06:28 AM3/17/12
to sy...@googlegroups.com
Thanks for suggestions! I'll try and start with this ASAP.
I have an annoying issue I've come up with. I'm using a 2011 macbook pro, and to try and get winpdb to work, I tried installing wxgtk. But that refuses to work because of an inconsistency with the 32-64 bit architecture:
dlopen(/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so, 2): no suitable image found.  Did find:
/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so: no matching architecture in universal wrapper
Is there no resolution for this problem without shifting to a 32-bit installation of python? And if I do that, how do I shift the default python being accessed from the terminal, to the new one I install?

Regards
Vishesh Kumar


>> For more options, visit this group at
>> http://groups.google.com/group/sympy?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To post to this group, send email to sy...@googlegroups.com.

> To unsubscribe from this group, send email to sympy+unsubscribe@googlegroups.com.

Aaron Meurer

unread,
Mar 17, 2012, 2:20:18 AM3/17/12
to sy...@googlegroups.com
Well, you could try compiling wxpython in 64 bits.

Probably easier is to just use 32-bit Python. On the Mac, the binary
can contain both architectures, and if you download the correct
installer from python.org, it does. You can get 32-bits by appending
arch -i386 to the executable, like "arch -i386 python". For
reference, you can get the 64-bit version by doing "arch -x86_64
python".

You can tell what version of Python you have by doing

import sys
import math
print "I am on %d-bits" % math.log(sys.maxint + 1, 2) + 1

Finally, I don't want to bash on winpdb, but you might checkout PuDB.
I personally think it's a nicer debugger, and you'll have zero GUI
related problems with it on the Mac, because it just runs in the
terminal.

Aaron Meurer

>> >> sympy+un...@googlegroups.com.


>> >> For more options, visit this group at
>> >> http://groups.google.com/group/sympy?hl=en.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "sympy" group.
>> > To post to this group, send email to sy...@googlegroups.com.
>> > To unsubscribe from this group, send email to

>> > sympy+un...@googlegroups.com.


>> > For more options, visit this group at
>> > http://groups.google.com/group/sympy?hl=en.
>> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.

> To view this discussion on the web visit
> https://groups.google.com/d/msg/sympy/-/IiaVgbpJclIJ.


>
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to

> sympy+un...@googlegroups.com.

Vishesh Kumar

unread,
Mar 24, 2012, 12:56:58 AM3/24/12
to sy...@googlegroups.com
I've spent the entire week trying to get pudb, winpdb, and sympy's plot to work on my macbook pro (OS X 10.6.8), and alternatively in Ubuntu 11 in a virtual machine. I managed to get winpdb and pudb to work. Sympy's plot, almost entirely doesn't. As far as I can tell, lots of digging tells me this is Pyglet's fault. 
The furthest I managed is, by executing pl.py, a program to plot(x**2) (and some slight variants of it), by entering arch -i386 python2.6  pl.py, I finally got a plot. But the python window that opens up, without fail, refuses to respond.
It sounds ambitious to me, but Pyglet has lots of issues on almost all kinds of machines – what is the possibility of trying to shift to a different rendering engine? Could I work on that as my GSoC project?
All the functions worked as described on a certain friend's machine, but in no instance on my computer. So it might be the fault of somethings I've installed beforehand etc., but I think that's pretty unlikely, because all errors I get (whenever I did get an error, and it wasn't just python hanging), seem to be Pyglet's issues.

Would you say I furnish you with more details? Or can working on an equation editor work as an entire GSoC project? In any way, I would be grateful to receive some direction on how to start off with that (the equation editor).

Regards
Vishesh Kumar

Aaron Meurer

unread,
Mar 24, 2012, 1:59:17 AM3/24/12
to sy...@googlegroups.com
Yeah, Pyglet is very problematic, especially on Mac OS X. There is
indeed work on moving to other backends, primarily matplotlib. See
https://github.com/sympy/sympy/pull/673, and also search this mailing
list for threads about it.

There is a GSoC idea to extend this framework.

By the way, the latest version of Pyglet was released in 2010, but
there have been active updates in the mecurial repository at
http://code.google.com/p/pyglet/. Does the development version work
any better?

For the equation editor, you need to decide what framework you will
use for it. I think for now, we should either go for something curses
based or web based. The former would hook into the current pretty
printing system. The latter would be something to add into SymPy
Live. Hopefully it could also be hooked into the IPython notebook as
well, though I dont know to what level they allow extensions like that
(you'll have to ask on their list). If extensions are possible in the
qtconsole, that would be an idea too, I guess.

Aaron Meurer

> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/sympy/-/jFAEywPqU0sJ.

Vishesh Kumar

unread,
Apr 2, 2012, 9:53:42 AM4/2/12
to sy...@googlegroups.com

I've not managed to get that pull request, and any matplotlib functionality to work on my computer. (I think I need assistance with regard to how to clone a pull request's edits?) 
I'm shifting my interest to working on an equation editor. To start off with, I'm working on making a curses-based entry maker with a basic functionality. Curses definitely seems like a good option to make a desktop level equation editor with, though I also plan to explore the other options.

I would want to ask if making a equation editor can be a GSoC project for an entire summer. Just the desktop execution in curses, should not take much time. But I'm not very sure how much time it can take to manage a web-based execution, and integration with things like the iPython or qt console. 
If that can't be an entire GSoC project, I would really want some help on how to get that pull request to work for me, because barely, if any plot functionality has worked for me so far. And the reason why I'm interested in working with plotting, is because I would like to work with respect to representation of plots of multi-dimensional surfaces, among other things.

krastano...@gmail.com

unread,
Apr 2, 2012, 1:17:51 PM4/2/12
to sy...@googlegroups.com
Hi,

I can not say anything about the equation editor, but I may try to
help with the plotting module. Whenever you decide to try to make it
work again just contact us and describe the problem. To clone it and
use it you have to do (more or less) the following:

- install git
- clone sympy from github.com/sympy/sympy.git
- make a new branch
- go onto that new branch (i.e. checkout it)
- pull onto your new empty branch the branch in which the plotting
module is developed (git pull https://github.com/Krastanov/sympy.git
plotting)
- play with it (You will need matplotlib installed. It would be also
very useful to install ipython (which anyway you may need for other
possible projects))

If you are working on a linux or mac system you can find step by step
explanations in the "developer workflow" page in our documentation.

Stefan

Vishesh Kumar

unread,
Apr 4, 2012, 3:08:42 PM4/4/12
to sy...@googlegroups.com
Hi

Thanks for the advice Stefan, I finally managed to get the matplot lib functionality to work! It's such a charm (especially after the continual failure of pyglet). In plotting 3-D surfaces, it gave me an error that autoscalezon takes only two arguments, three given. That seemed like a tiny error, I managed to fix in my own branch. I don't think that merits a pull request or anything, does it? And if not, how does one go about covering that with a fix? =)

To Aaron, and any interested mentor, I would really like to work the equation editor idea, and need some assistance and guidance on how to make a schedule, and what all topics or ground I am expected to cover in a summer. Also, what is the possibility of contributing in ways not directly relevant to the equation editor, like the random idea for the plotting module I put in my application? Would that be considered relevant to my summer work, if selected?

Vishesh Kumar

unread,
Apr 4, 2012, 3:10:27 PM4/4/12
to sy...@googlegroups.com
I'm sorry I forgot to insert a link to my application draft, I've made. It's here!

Regards
Vishesh Kumar

krastano...@gmail.com

unread,
Apr 4, 2012, 3:20:07 PM4/4/12
to sy...@googlegroups.com
probably off-topic: The error you mentioned (when plotting surfaces)
is a bug in matplotlib that is already fixed by them (but not released
yet). Good to know that you fixed it yourself.

Aaron Meurer

unread,
Apr 4, 2012, 3:34:08 PM4/4/12
to sy...@googlegroups.com
Here's the idea I had for the curses based editor. You take our
pretty printing system, and rewrite it so that instead of building up
the 2d string expression like it does now, it builds it up in blocks.
Each block would be an object that contains it's string form. You can
append blocks to the the side of other blocks, or extend them in a
direction with whitespace, and so on. This is all things that the
pretty printer does now to make things work, but it does it by just
manipulating the strings directly. My idea is to have it put in proxy
object that hold the strings, so you can tell afterword what the block
structure is.

Then, you use curses to manipulate these blocks. It should be easy to
create a keyboard interface to maneuver the block structure.

Then, the tricky part is to build the interface to actually manipulate
the block structure, in real time. Suppose I had x**2 already entered
and printed. If I have the cursor fully to the right of the
expression (i.e., in an empty block to the right of the x**2 block),
and I type /, it should call the "division" hook, which will add a
block with -- below the block with the printed x**2, and then add an
empty block below that where the cursor will be placed. Then, if I
type y, it will change the empty block to contain y. If I keep the
cursor below the -- but to the right of the y, and I type + z, it
should create two blocks to the right of y, one with " + " and one
with z, *and*, it should extend the -- block above it to ----- and
extend and recenter the x**2 block.

Much of this logic is already implemented in the pretty printer.
You'll just need to restructure it to handle keeping track of the
blocks after they are built, and also some restructuring relating to
manipulating individual blocks after they are built. You'll probably
need to do some restructuring to make it print expressions that aren't
fully built (like just "x +"). And you'll obviously need to hook into
curses to do keyboard shortcuts and interface for all this (but if you
use a good curses frontend, this is not difficult).

This is just the backend. For the frontend, you could create a simple
repl (in curses) for demonstration purposes. Ideally, this would be
hooked into a real Python curses repl, like bpython, or a future
IPython curses console. I wouldn't worry to much about the frontend,
except getting what is necessary to actually use the thing.

If you want to do the equation editor in an interface other than
curses, I'm afraid I don't have many suggestions for you. You'll have
to come up with the ideas yourself. We don't already have a printer
written in any other backend that you can manipulate, so you'd either
have to find one yourself and hook it into SymPy, or start from
scratch somehow.

Aaron Meurer

On Wed, Apr 4, 2012 at 1:08 PM, Vishesh Kumar <vishe...@gmail.com> wrote:
> Hi
>
> Thanks for the advice Stefan, I finally managed to get the matplot lib
> functionality to work! It's such a charm (especially after the continual
> failure of pyglet). In plotting 3-D surfaces, it gave me an error that
> autoscalezon takes only two arguments, three given. That seemed like a tiny
> error, I managed to fix in my own branch. I don't think that merits a pull
> request or anything, does it? And if not, how does one go about covering
> that with a fix? =)
>
> To Aaron, and any interested mentor, I would really like to work the
> equation editor idea, and need some assistance and guidance on how to make a
> schedule, and what all topics or ground I am expected to cover in a summer.
> Also, what is the possibility of contributing in ways not directly relevant
> to the equation editor, like the random idea for the plotting module I put
> in my application? Would that be considered relevant to my summer work, if
> selected?

It's probably better to keep it on topic (though you are of course
free to work on extraneous stuff if you have time).

>
>
> On Monday, 2 April 2012 22:47:51 UTC+5:30, Stefan Krastanov wrote:
>>
>> Hi,
>>
>> I can not say anything about the equation editor, but I may try to
>> help with the plotting module. Whenever you decide to try to make it
>> work again just contact us and describe the problem. To clone it and
>> use it you have to do (more or less) the following:
>>
>> - install git
>> - clone sympy from github.com/sympy/sympy.git
>> - make a new branch
>> - go onto that new branch (i.e. checkout it)
>> - pull onto your new empty branch the branch in which the plotting
>> module is developed (git pull https://github.com/Krastanov/sympy.git
>> plotting)
>> - play with it (You will need matplotlib installed. It would be also
>> very useful to install ipython (which anyway you may need for other
>> possible projects))
>>
>> If you are working on a linux or mac system you can find step by step
>> explanations in the "developer workflow" page in our documentation.
>>
>> Stefan
>

> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/sympy/-/Blj0HTDMxJEJ.


>
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to

> sympy+un...@googlegroups.com.

Vishesh Kumar

unread,
Apr 6, 2012, 6:00:48 PM4/6/12
to sy...@googlegroups.com

I made a pull request - https://github.com/sympy/sympy/pull/1220 - as a part of my GSoC application – https://github.com/sympy/sympy/wiki/GSoC-2012-Application-Vishesh-Kumar:-Equation-Editor, which I have also submitted through Google Melange.
I would like some guidance and feedback with respect to my project idea, and how to make it more specific and targeted.

someone

unread,
Apr 6, 2012, 7:23:08 PM4/6/12
to sy...@googlegroups.com, vishe...@gmail.com
Hi,


> I made a pull request - https://github.com/sympy/sympy/pull/1220 - as
> a part of my GSoC application
> –
> https://github.com/sympy/sympy/wiki/GSoC-2012-Application-Vishesh-Kumar:-Equation-Editor,
> which I have also submitted through Google Melange. I would like some
> guidance and feedback with respect to my project idea, and how to
> make it more specific and targeted.


Some time ago I read a paper about abstract matrices. Its
exact title is:

"Abstract Matrices in Symbolic Computation" by Alan Sexton
and Volker Sorge

Maybe you want to include a matrix editor in your GUI.
This would allow to enter arbitrary matrices easily.
And the algorithms in that paper even allow to use
the textbook "dots"-notation.

In combination with autogeneration of "missing"
symbols like a_{i,j} for the entries this could
be really useful!

Vishesh Kumar

unread,
Apr 8, 2012, 7:31:08 AM4/8/12
to sy...@googlegroups.com
I seem to be receiving no response on my proposal. Does that mean that the equation editor as an idea won't be entertained this year? Are there any chances I could work on a similar more relevant idea, or something entirely different, that might be require work but nobody around to do it, and that I could be allowed to change my GSoC proposal accordingly?

Also, I have been working on this http://code.google.com/p/sympy/issues/detail?id=1077 issue, regarding the Q.algebraic functionality, and have come across some shortcomings, which I seem to not be able to fix. I can't fix Q.algebraic(log(rational)) to return false, because I don't get how the log function works. Apart from that, there is even an assertion in the tests that says Q.algebraic(sin(7)) is None. But according to Wolfram|Alpha, that shouldn't be the case. How can one define Q.algebraic for general trigonometric functions of this sort?

Regards
Vishesh Kumar

Joachim Durchholz

unread,
Apr 8, 2012, 8:57:43 AM4/8/12
to sy...@googlegroups.com
Am 08.04.2012 13:31, schrieb Vishesh Kumar:
> I seem to be receiving no response on my proposal.

Just a notice to other potential reviewers: I'm barely keeping up with
my own backlog so I can't do anything for Vishesh's proposal.

Bharath M R

unread,
Apr 14, 2012, 1:41:05 PM4/14/12
to sy...@googlegroups.com
This might be a little late but I found the equation editor in lyx pretty amazing
though it is for formatting latex expressions. I think a lot of ideas can be borrowed
from it.

smichr

unread,
Jun 5, 2013, 11:54:20 PM6/5/13
to sy...@googlegroups.com
I just came across an LGPL licensed grapher that has a nice equation editor with it at http://graph.tk/
Reply all
Reply to author
Forward
0 new messages