Hi,

I have been unable to reproduce the problem on my system.
 matplotlib.__version__ : '0.99.3rc1' + Python 2.6.5 on Win32

attached is a test example, could you please post the full error trace?
Is the text tab populated correctly with labels, does the problem
occur immediately or on clicking Apply ?

> Could the similar text-editing functionality be added for label and title
> text? It would be nice to update them via these menus.

yes, I believe it should be possible to add title and xlabel text
objects to the texts tab.


On Tue, Apr 13, 2010 at 6:55 AM, Gökhan Sever <gokhanse...@gmail.com> wrote:
>
>
> On Sun, Apr 11, 2010 at 1:53 PM, Peter Butterworth <butt...@gmail.com>
> wrote:
>>
>> I've now uploaded the final version for review at the sourceforge tracker
>> :
>>
>> https://sourceforge.net/tracker/?func=detail&aid=2981606&group_id=80706&atid=560722
>>
>> figureoptions.py: modify plot options interactively (see attached
>> screenshot)
>> Requires PyQt4 installed
>>
>> Support of :
>> - Axes (xy scale)
>> - Legend
>> - Lines
>> - Patches (Rectangle, Ellipse, Polygon, dolphins...)
>> - Texts
>>
>> Ignores :
>> - Collections
>>
>> Limitations:
>> - not available for multiple axes in the same subplot
>
> Hello,
>
> I couldn't make options in Texts tab working. I simply add a text by:
>
> plt.text(0,1, "test")
>
> Texts tab appears however nothing functions. I get errors ending with
> "TypeError: 'str' object is not callable" in my each try.
>
>
> --
> Gökhan

-- 
thanks,
peter butterworth
'''a short example demonstrating the figure options popup binded to the mouse click event  


figureoptions requires PyQt v4.3 or superior installed'''

import matplotlib; matplotlib.use("Qt4Agg")
import matplotlib.pyplot as plt
import matplotlib.patches
import matplotlib.backends.qt4_editor.figureoptions as figureoptions    
import numpy as np
assert plt.get_backend()=='Qt4Agg'
    
    
x = np.arange(5)
fig = plt.figure()
ax = fig.add_subplot(111)
#ax = fig.add_subplot(211)
#ax2 = fig.add_subplot(212)
#ax2.plot(x)



## Shapes
e0=matplotlib.patches.Ellipse((0, 0), 4, 12, angle=0,  fill=False, ls='dashed', ec='k')
e2=matplotlib.patches.Ellipse((0, 0), 4, 12, angle=20, fill=True, alpha=0.4, ec='k', label='e2')
ax.add_patch(e0)
ax.add_patch(e2)


x, y = np.arange(3), np.array([0, 2, 1])
ax.fill(x, y, fill=False)

## Lines    
ax.plot(x, '-rx', label="y0")

## Texts
t1=ax.text(-5, -5, 't1')
t2=ax.text(0.5, 0.5, 't2')

## Axes
ax.set_title("Click on plot to open figure options editor")
ax.axis('equal')

## Legend
leg=ax.legend(loc=0)


## Lines
#ax.plot(x, '0.8', label="y0")
#ax.plot(x + 0.5, 'g--', label="_y1")
#ax.plot(x + 1, 'cD', label="y2")
#z, = ax.plot(np.ones(5))
#z.set_visible(False)





def onclick(event): figureoptions.figure_edit(ax)    
cid = fig.canvas.mpl_connect('button_press_event', onclick)
plt.show()
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to