Re: [Matplotlib-users] backend with edition capabilities

2012-03-09 Thread François Beaubert

Le 05/03/2012 21:37, Federico Ariza a écrit :

Hi

As I thought, this is a tricky subject.

So far I just opened a github account and added the three files that I 
am using.

https://github.com/fariza/MPL-Experimental-Backend
I have tested this on linux, I do not know if it works on windows.

I know glade is not the right way to do it if I want this to be taken 
serously.
So far the only thing I want is to experiment and see what subset of 
actions are needed by most people.


The code is ugly but if this is something that more people find 
useful, I will do something about that, if not I will keep it to 
myself and my personal use.


Thanks
Federico


P.S. The group expander is because I have personal need of line group 
management

P.S.2. The toolbar will be modified to be unified among all the figures
P.S.3. The figures are arranged in a notebook because I hate having 
multiple open windows from the same source.
P.S.4. I am thinking on adding a shell with all the figure and line 
instances ready to be modified by hand.


On Wed, Feb 29, 2012 at 5:02 PM, Federico Ariza 
ariza.feder...@gmail.com mailto:ariza.feder...@gmail.com wrote:


Dear all

I am a long time matplotlib user  (under linux) but new to the
list (second post).

On of the things that bothers me the most is the inability of the
standard backend to change simple things (line color, labels, etc...).

I resorted to create a simple FrankeinBackend (based on the GtkAgg)
I guess I am not the only one missing this kind of features or
experimenting with similar ideas.

Some points comes to my mind:
Is there any special place where we can share and discuss this?
Is it better if I just open a googlecode place for my code.?
This is a recurring question and I have no idea what I am talking
about
This is already done I am reinventing the wheel

Thanks
Federico

-- 
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?


-- Antonio Alducin --




--
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin --


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2


___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Hi,

Great project and addition to matplotlib ! Something that was missing 
for me ... thanks !
I've tried to use your backend with editions capabilities but i'm stick 
with this erro:


python test.py
Traceback (most recent call last):
  File test.py, line 4, in module
import matplotlib.pyplot as plt
  File /usr/lib/pymodules/python2.7/matplotlib/pyplot.py, line 95, in 
module

new_figure_manager, draw_if_interactive, show = pylab_setup()
  File /usr/lib/pymodules/python2.7/matplotlib/backends/__init__.py, 
line 25, in pylab_setup

globals(),locals(),[backend_name])
  File 
/home/beaubert/Téléchargements/fariza-MPL-Experimental-Backend-aa7ce4a/experimentalbackend.py, 
line 34, in module

settings.props.gtk_button_images = True
AttributeError: 'gobject.GProps' object has no attribute 'gtk_button_images'

I'm on Kubuntu 11.10.
Thank's

Cheers
Francois
attachment: francois_beaubert.vcf--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] backend with edition capabilities

2012-03-05 Thread Federico Ariza
Hi

As I thought, this is a tricky subject.

So far I just opened a github account and added the three files that I am
using.
https://github.com/fariza/MPL-Experimental-Backend
I have tested this on linux, I do not know if it works on windows.

I know glade is not the right way to do it if I want this to be taken
serously.
So far the only thing I want is to experiment and see what subset of
actions are needed by most people.

The code is ugly but if this is something that more people find useful, I
will do something about that, if not I will keep it to myself and my
personal use.

Thanks
Federico


P.S. The group expander is because I have personal need of line group
management
P.S.2. The toolbar will be modified to be unified among all the figures
P.S.3. The figures are arranged in a notebook because I hate having
multiple open windows from the same source.
P.S.4. I am thinking on adding a shell with all the figure and line
instances ready to be modified by hand.

On Wed, Feb 29, 2012 at 5:02 PM, Federico Ariza ariza.feder...@gmail.comwrote:

 Dear all

 I am a long time matplotlib user  (under linux) but new to the list
 (second post).

 On of the things that bothers me the most is the inability of the standard
 backend to change simple things (line color, labels, etc...).

 I resorted to create a simple FrankeinBackend (based on the GtkAgg)
 I guess I am not the only one missing this kind of features or
 experimenting with similar ideas.

 Some points comes to my mind:
 Is there any special place where we can share and discuss this?
 Is it better if I just open a googlecode place for my code.?
 This is a recurring question and I have no idea what I am talking about
 This is already done I am reinventing the wheel

 Thanks
 Federico

 --
 Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

 -- Antonio Alducin --




-- 
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin --
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] backend with edition capabilities

2012-03-01 Thread Benjamin Root
On Wed, Feb 29, 2012 at 4:02 PM, Federico Ariza ariza.feder...@gmail.comwrote:

 Dear all

 I am a long time matplotlib user  (under linux) but new to the list
 (second post).

 On of the things that bothers me the most is the inability of the standard
 backend to change simple things (line color, labels, etc...).


There was a feature a couple of us were hacking on a while back that would
allow for live switching between color and blackwhite modes.  Is this sort
of stuff what you are speaking of?  The changes were too invasive to be
included, but it was an interesting experiment.


 I resorted to create a simple FrankeinBackend (based on the GtkAgg)
 I guess I am not the only one missing this kind of features or
 experimenting with similar ideas.

 Some points comes to my mind:
 Is there any special place where we can share and discuss this?


GitHub


 Is it better if I just open a googlecode place for my code.?


No, GitHub (or any other git-compatible place that could interact with
mpl's github repo.)


 This is a recurring question and I have no idea what I am talking about


If it is what I think you mean, it is not an often asked-for-feature, but
it has been discussed.  It is a very difficult problem to tackle and
significant refactoring work would be needed to even begin to address it.
Note, however, such refactor work by itself would be extremely valuable.
Along with that work should also be efforts towards improved documentation,
code comments, examples and tests.  This way, when as work is done, we can
make sure that nothing is breaking (or make breaks well documented).


 This is already done I am reinventing the wheel


Nope, more like re-drawing the wheel.  The wheel itself has yet to be made
to everyone's satisfaction.

Cheers!
Ben Root
--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] backend with edition capabilities

2012-03-01 Thread Andrea Gavana
On 1 March 2012 21:37, Benjamin Root wrote:


 On Wed, Feb 29, 2012 at 4:02 PM, Federico Ariza ariza.feder...@gmail.com
 wrote:

 Dear all

 I am a long time matplotlib user  (under linux) but new to the list
 (second post).

 On of the things that bothers me the most is the inability of the standard
 backend to change simple things (line color, labels, etc...).


 There was a feature a couple of us were hacking on a while back that would
 allow for live switching between color and blackwhite modes.  Is this sort
 of stuff what you are speaking of?  The changes were too invasive to be
 included, but it was an interesting experiment.

I thought the OP's original question was something like the Matlab
plot editor (or whatever is its name), which allows you to edit line
colours, styles, gridlines styles, this kind of stuff on a live plot
(mind you, it's been 6 years since I used Matlab for the last time and
I may have forgotten what the plot editor does).

Anyway, if I am not completely off-track, this is something I had been
looking for as well in matplotlib a while back (3, 4 years ago), but
at that time I was told it would have been complicated to implement it
for all the live backend (I can't recall the exact reason).

I would say that, at least for the backends based on wxPython, this
kind of modify-the-live-plot-via-GUI-interaction should be relatively
straightforward, at least for the GUI part and for the basics (line
styles, colours, markers and so on). However I am not sure what are
the implications on the core matplotlib code.

But if I have misunderstood, I apologize for the noise :-) .

Andrea.

Imagination Is The Only Weapon In The War Against Reality.
http://xoomer.alice.it/infinity77/

 import PyQt4.QtGui
Traceback (most recent call last):
  File interactive input, line 1, in module
ImportError: No module named PyQt4.QtGui

 import pygtk
Traceback (most recent call last):
  File interactive input, line 1, in module
ImportError: No module named pygtk

 import wx



--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] backend with edition capabilities

2012-03-01 Thread Jerzy Karczmarczuk
Andrea Gavana :
 Anyway, if I am not completely off-track, this is something I had been
 looking for as well in matplotlib a while back (3, 4 years ago), but
 at that time I was told it would have been complicated to implement it
 for all the live backend (I can't recall the exact reason).

 I would say that, at least for the backends based on wxPython, this
 kind of modify-the-live-plot-via-GUI-interaction should be relatively
 straightforward, at least for the GUI part and for the basics (line
 styles, colours, markers and so on).
There is one non-trivial difference between Matplotlib and Matlab.
Matplotlib is just a library, and not an integrated package with its 
own event processing loop, multithreading, etc. When you plot() 
something under Matlab or Scilab, you generate some objecs (gcf, gca) 
and other stuff, accessible from outside. Your program turns normally, 
your console works. So, you may launch a procedure which analyses all 
the plotted data and change the patches, lines, collections, etc., 
using the matplotlib jargon.

In matplotlib, upon show(), you relinquish the control. The interaction 
becomes clumsy, the animation becomes clumsy, since matplotlib doesn't 
give you the full access to the event loop.
OF COURSE you may do it, but it will require some work.
One possibility is to use an interface which by design works (I 
presume...)  in a separate, non-blocking thread. I mean: IPython. If you 
launch IPython --pylab, then you may, e.g. construct:

x=linspace(0.0,25.0,300);  y=sin(x)
plot(x,y)

and the figure is created without show().
Then, write:

a=gca(); p=a.lines[0]

and nothing more difficult than:

p.set_lw(3); p.set_color('red'); draw()

You have edited your line. No need to change the code of matplotlib.

Good luck.

Jerzy Karczmarczuk



--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] backend with edition capabilities

2012-03-01 Thread Benjamin Root
On Thursday, March 1, 2012, Jerzy Karczmarczuk 
jerzy.karczmarc...@unicaen.fr wrote:
 Andrea Gavana :
 Anyway, if I am not completely off-track, this is something I had been
 looking for as well in matplotlib a while back (3, 4 years ago), but
 at that time I was told it would have been complicated to implement it
 for all the live backend (I can't recall the exact reason).

 I would say that, at least for the backends based on wxPython, this
 kind of modify-the-live-plot-via-GUI-interaction should be relatively
 straightforward, at least for the GUI part and for the basics (line
 styles, colours, markers and so on).
 There is one non-trivial difference between Matplotlib and Matlab.
 Matplotlib is just a library, and not an integrated package with its
 own event processing loop, multithreading, etc. When you plot()
 something under Matlab or Scilab, you generate some objecs (gcf, gca)
 and other stuff, accessible from outside. Your program turns normally,
 your console works. So, you may launch a procedure which analyses all
 the plotted data and change the patches, lines, collections, etc.,
 using the matplotlib jargon.

 In matplotlib, upon show(), you relinquish the control. The interaction
 becomes clumsy, the animation becomes clumsy, since matplotlib doesn't
 give you the full access to the event loop.
 OF COURSE you may do it, but it will require some work.
 One possibility is to use an interface which by design works (I
 presume...)  in a separate, non-blocking thread. I mean: IPython. If you
 launch IPython --pylab, then you may, e.g. construct:

 x=linspace(0.0,25.0,300);  y=sin(x)
 plot(x,y)

 and the figure is created without show().
 Then, write:

 a=gca(); p=a.lines[0]

 and nothing more difficult than:

 p.set_lw(3); p.set_color('red'); draw()

 You have edited your line. No need to change the code of matplotlib.

 Good luck.

 Jerzy Karczmarczuk



Just to be clear, you are speaking of the difference between interactive
and non-interactive modes, which is entirely switchable in matplotlib.
 However, widgets can be used in either mode. mpl can do what matlab can
do, and more -- in theory.  We simply do not have all the widgets and tools
made.

Ipython uses mpl with interactive mode turned on. All artists are available
for editing at any time *until* the figure is destroyed (in either mode).
 It just happens that the execution moves past show() in non-interactive
mode only when the figures are destroyed.

As for any clumsiness for animations, it is because the feature is still
new and Ryan May and I would greatly welcome additional viewpoints in the
design discussions.

Ben Root
--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] backend with edition capabilities

2012-03-01 Thread Matt Newville
Dear Andrea, All

On 1 March 2012 22:31, Andrea Gavana andrea.gav...@gmail.com wrote:

 I thought the OP's original question was something like the Matlab
 plot editor (or whatever is its name), which allows you to edit line
 colours, styles, gridlines styles, this kind of stuff on a live plot
 (mind you, it's been 6 years since I used Matlab for the last time and
 I may have forgotten what the plot editor does).

 Anyway, if I am not completely off-track, this is something I had been
 looking for as well in matplotlib a while back (3, 4 years ago), but
 at that time I was told it would have been complicated to implement it
 for all the live backend (I can't recall the exact reason).

 I would say that, at least for the backends based on wxPython, this
 kind of modify-the-live-plot-via-GUI-interaction should be relatively
 straightforward, at least for the GUI part and for the basics (line
 styles, colours, markers and so on). However I am not sure what are
 the implications on the core matplotlib code.

 But if I have misunderstood, I apologize for the noise :-) .

For the wx backend to matplotlib, wxmplot
(http://github.com/newville/wxmplot,
http://newville.github.com/wxmplot/) does provide some of the basic
editing features for simple 2d line plots such as changing colour,
style, markers, text labels and so on via a GUI form, much as you
describe.  For image displays, it allows changing the colour table,
smoothing, and rotating and so on.

It is definitely not as complete as all of matplotlib, and I'm sure it
could be improved.  Still,  it can serve many simple plotting needs
where one wants to give the end-user the ability to customize the
plots, and wx/matplotlib developers needing might find it useful.

--Matt Newville

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] backend with edition capabilities

2012-02-29 Thread Federico Ariza
Dear all

I am a long time matplotlib user  (under linux) but new to the list (second
post).

On of the things that bothers me the most is the inability of the standard
backend to change simple things (line color, labels, etc...).

I resorted to create a simple FrankeinBackend (based on the GtkAgg)
I guess I am not the only one missing this kind of features or
experimenting with similar ideas.

Some points comes to my mind:
Is there any special place where we can share and discuss this?
Is it better if I just open a googlecode place for my code.?
This is a recurring question and I have no idea what I am talking about
This is already done I am reinventing the wheel

Thanks
Federico

-- 
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?

-- Antonio Alducin --
--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users