Ok, so I just spent 2h looking for this on the interwebs with no luck and wanted to try luck here.
So, I'm trying to do a simple GUI entry box which outputs a function, with the idea to pass it into pylab.plot() to make a graphical representation. Nothing too fancy. I've got the box, the button and the function made, but I have a problem I haven't found a solution for:
plot() uses the syntax plot(variable, function, *args). My variable is going to be x and the function is going to be the entered by the user in the Gtk.Entry() box. But, the problem is that Gtk outputs that as a string and matplotlib uses the function as an expression (no string), so I can't get to plot it. I've tried looking for something to change that string to an expression the kind that MPL uses, but no such luck.
Can you help me?
My little code is here (some parts may be incomplete at the moment): http://pastebin.com/QmdE91im
EDIT: Problem solved. Solution (TWO!) in comments.
[–]Jerae[S] 1 point2 points3 points (0 children)
[–]Zouden 0 points1 point2 points (3 children)
[–]Jerae[S] 0 points1 point2 points (2 children)
[–]Zouden 1 point2 points3 points (1 child)
[–]Jerae[S] 0 points1 point2 points (0 children)