Chaco 4.1 and ChacoPlotItem

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Chaco 4.1 and ChacoPlotItem

Brennan Williams
I know ChacoPlotItem isn't the recommended route for plotting in Chaco
and I do tend to use Plot and ComponentEditor etc for 95% of my line and
scatter plots. However for a couple of plots where the user is really
just viewing rather than interacting with the plot I do still use it.

Moving from EPD 6.2 to EPD 7.2 which uses Chaco 4.1.0 (this is on
Windows 7 32-bit) I find that ChacoPlotItem is broken.

I have also tried out the traits_editor.py demo in  
....chaco_4.1.0\demo\basic and I get the same error which is...

Traceback (most recent call last):
   File "C:\Python27\Examples\chaco-4.1.0\demo\basic\traits_editor.py",
line 87, in <module>
     demo.edit_traits(kind="modal")
   File "C:\Python27\lib\site-packages\traits\has_traits.py", line 2266,
in edit_traits
     handler, id, scrollable, args )
   File "C:\Python27\lib\site-packages\traitsui\view.py", line 433, in ui
     ui.ui( parent, kind )
   File "C:\Python27\lib\site-packages\traitsui\ui.py", line 218, in ui
     self.rebuild( self, parent )
   File "C:\Python27\lib\site-packages\traitsui\wx\toolkit.py", line
147, in ui_modal
     ui_modal.ui_modal( ui, parent )
   File "C:\Python27\lib\site-packages\traitsui\wx\ui_modal.py", line
49, in ui_modal
     ui_dialog( ui, parent, True )
   File "C:\Python27\lib\site-packages\traitsui\wx\ui_modal.py", line
74, in ui_dialog
     ui.owner.init( ui, parent, is_modal )
   File "C:\Python27\lib\site-packages\traitsui\wx\ui_modal.py", line
164, in init
     sw = panel( ui, window )
   File "C:\Python27\lib\site-packages\traitsui\wx\ui_panel.py", line
349, in panel
     content[0], ui )
   File "C:\Python27\lib\site-packages\traitsui\wx\ui_panel.py", line
523, in fill_panel_for_group
     create_panel )
   File "C:\Python27\lib\site-packages\traitsui\wx\ui_panel.py", line
672, in __init__
     self.add_items(content, panel, self.sizer)
   File "C:\Python27\lib\site-packages\traitsui\wx\ui_panel.py", line
1028, in add_items
     item_panel ).set(
   File "C:\Python27\lib\site-packages\chaco\chaco_plot_editor.py", line
184, in simple_editor
     description = description )
   File "C:\Python27\lib\site-packages\traitsui\editor.py", line 133, in
__init__
     self.old_value = getattr( self.object, self.name )
AttributeError: 'Foo' object has no attribute 'Plot'


I've attached the traits_editor.py demo as well...

I looked at chaco_plot_editor.py but I can't see what is causing the
problem. I also compared this with the old one from EPD 6.2 but there
are no major differences, just the updated imports, a replacement of
SimpleZoom with ZoomTool and the correction of an htitle typo to vtitle.

Brennan


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

traits_editor.py (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Chaco 4.1 and ChacoPlotItem - just saw Robert Kern's bug fix on github

Brennan Williams
Just found Robert Kern's bug fix to chaco_plot_editor.py a month ago and
have applied it. Tested it with both wx and qt4 toolkit and it fixes the
problem. Also tested it with my own app and it fixes the problem there
as well.

Regards

Brennan

On 28/02/2012 1:59 p.m., Brennan Williams wrote:

> I know ChacoPlotItem isn't the recommended route for plotting in Chaco
> and I do tend to use Plot and ComponentEditor etc for 95% of my line
> and scatter plots. However for a couple of plots where the user is
> really just viewing rather than interacting with the plot I do still
> use it.
>
> Moving from EPD 6.2 to EPD 7.2 which uses Chaco 4.1.0 (this is on
> Windows 7 32-bit) I find that ChacoPlotItem is broken.
>
> I have also tried out the traits_editor.py demo in  
> ....chaco_4.1.0\demo\basic and I get the same error which is...
>
> Traceback (most recent call last):
>   File "C:\Python27\Examples\chaco-4.1.0\demo\basic\traits_editor.py",
> line 87, in <module>
>     demo.edit_traits(kind="modal")
>   File "C:\Python27\lib\site-packages\traits\has_traits.py", line
> 2266, in edit_traits
>     handler, id, scrollable, args )
>   File "C:\Python27\lib\site-packages\traitsui\view.py", line 433, in ui
>     ui.ui( parent, kind )
>   File "C:\Python27\lib\site-packages\traitsui\ui.py", line 218, in ui
>     self.rebuild( self, parent )
>   File "C:\Python27\lib\site-packages\traitsui\wx\toolkit.py", line
> 147, in ui_modal
>     ui_modal.ui_modal( ui, parent )
>   File "C:\Python27\lib\site-packages\traitsui\wx\ui_modal.py", line
> 49, in ui_modal
>     ui_dialog( ui, parent, True )
>   File "C:\Python27\lib\site-packages\traitsui\wx\ui_modal.py", line
> 74, in ui_dialog
>     ui.owner.init( ui, parent, is_modal )
>   File "C:\Python27\lib\site-packages\traitsui\wx\ui_modal.py", line
> 164, in init
>     sw = panel( ui, window )
>   File "C:\Python27\lib\site-packages\traitsui\wx\ui_panel.py", line
> 349, in panel
>     content[0], ui )
>   File "C:\Python27\lib\site-packages\traitsui\wx\ui_panel.py", line
> 523, in fill_panel_for_group
>     create_panel )
>   File "C:\Python27\lib\site-packages\traitsui\wx\ui_panel.py", line
> 672, in __init__
>     self.add_items(content, panel, self.sizer)
>   File "C:\Python27\lib\site-packages\traitsui\wx\ui_panel.py", line
> 1028, in add_items
>     item_panel ).set(
>   File "C:\Python27\lib\site-packages\chaco\chaco_plot_editor.py",
> line 184, in simple_editor
>     description = description )
>   File "C:\Python27\lib\site-packages\traitsui\editor.py", line 133,
> in __init__
>     self.old_value = getattr( self.object, self.name )
> AttributeError: 'Foo' object has no attribute 'Plot'
>
>
> I've attached the traits_editor.py demo as well...
>
> I looked at chaco_plot_editor.py but I can't see what is causing the
> problem. I also compared this with the old one from EPD 6.2 but there
> are no major differences, just the updated imports, a replacement of
> SimpleZoom with ZoomTool and the correction of an htitle typo to vtitle.
>
> Brennan
>
>
>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Chaco 4.1 and ChacoPlotItem

Jonathan March
In reply to this post by Brennan Williams
For the record, see followup post at:
https://mail.enthought.com/pipermail/enthought-dev/2012-February/030656.html

On Mon, Feb 27, 2012 at 6:59 PM, Brennan Williams <
[hidden email]> wrote:

> I know ChacoPlotItem isn't the recommended route for plotting in Chaco and
> I do tend to use Plot and ComponentEditor etc for 95% of my line and
> scatter plots. However for a couple of plots where the user is really just
> viewing rather than interacting with the plot I do still use it.
>
> Moving from EPD 6.2 to EPD 7.2 which uses Chaco 4.1.0 (this is on Windows
> 7 32-bit) I find that ChacoPlotItem is broken.
>
> I have also tried out the traits_editor.py demo in
>  ....chaco_4.1.0\demo\basic and I get the same error which is...
>
> Traceback (most recent call last):
>  File "C:\Python27\Examples\chaco-4.**1.0\demo\basic\traits_editor.**py",
> line 87, in <module>
>    demo.edit_traits(kind="modal")
>  File "C:\Python27\lib\site-**packages\traits\has_traits.py"**, line
> 2266, in edit_traits
>    handler, id, scrollable, args )
>  File "C:\Python27\lib\site-**packages\traitsui\view.py", line 433, in ui
>    ui.ui( parent, kind )
>  File "C:\Python27\lib\site-**packages\traitsui\ui.py", line 218, in ui
>    self.rebuild( self, parent )
>  File "C:\Python27\lib\site-**packages\traitsui\wx\toolkit.**py", line
> 147, in ui_modal
>    ui_modal.ui_modal( ui, parent )
>  File "C:\Python27\lib\site-**packages\traitsui\wx\ui_modal.**py", line
> 49, in ui_modal
>    ui_dialog( ui, parent, True )
>  File "C:\Python27\lib\site-**packages\traitsui\wx\ui_modal.**py", line
> 74, in ui_dialog
>    ui.owner.init( ui, parent, is_modal )
>  File "C:\Python27\lib\site-**packages\traitsui\wx\ui_modal.**py", line
> 164, in init
>    sw = panel( ui, window )
>  File "C:\Python27\lib\site-**packages\traitsui\wx\ui_panel.**py", line
> 349, in panel
>    content[0], ui )
>  File "C:\Python27\lib\site-**packages\traitsui\wx\ui_panel.**py", line
> 523, in fill_panel_for_group
>    create_panel )
>  File "C:\Python27\lib\site-**packages\traitsui\wx\ui_panel.**py", line
> 672, in __init__
>    self.add_items(content, panel, self.sizer)
>  File "C:\Python27\lib\site-**packages\traitsui\wx\ui_panel.**py", line
> 1028, in add_items
>    item_panel ).set(
>  File "C:\Python27\lib\site-**packages\chaco\chaco_plot_**editor.py",
> line 184, in simple_editor
>    description = description )
>  File "C:\Python27\lib\site-**packages\traitsui\editor.py", line 133, in
> __init__
>    self.old_value = getattr( self.object, self.name )
> AttributeError: 'Foo' object has no attribute 'Plot'
>
>
> I've attached the traits_editor.py demo as well...
>
> I looked at chaco_plot_editor.py but I can't see what is causing the
> problem. I also compared this with the old one from EPD 6.2 but there are
> no major differences, just the updated imports, a replacement of SimpleZoom
> with ZoomTool and the correction of an htitle typo to vtitle.
>
> Brennan
>
>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>
>
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev