Methods for Creating Interactive Graphs

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

Methods for Creating Interactive Graphs

lcota
I would like to create directed graphs (feed-forward networks) using the enthought suite, though I am unsure how to do this. I have been playing around with networkx module though this doesn't seem to allow the graphs to be interactive.  It is also unclear how to create graphs that have a clear left-to-right direction.

Any suggestions?

Thanks!

- Luis

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

Re: Methods for Creating Interactive Graphs

Stephan Gerhard
Hi Luis!

I am working on the ConnectomeViewer, which is based on enthought suite
and uses Mayavi. It is for network analysis and visualization in
neuroimaging: http://www.connectomeviewer.org/

You should have a look at it. As far as interactivity is concerned you
can: select nodes / edges, define their colors, position the nodes in
space (i.e. using layouting algorithms or hand positioned, e.g. you
position your nodes form left-to-right). And you can have directed
graphs (but these are not yet tested well, since I dealt sofar mainly
with undirected ones.)

Currently, I'm investigating and developing what you are looking for. So
there is yet to come. I'd like to understand your use case. Maybe you
could provide me with a small network and what you want to do exactly
and I'll look into it.

In VTK, there are graph visualization techniques, which I try to
integrate into Mayavi/ConnectomeViewer, but this needs still some work.
I attach an example Python script to see in which direction this goes.
Possibility to have directed graphs exists.

> It is also unclear how to create graphs that have a clear
> left-to-right direction.

What do you mean by that?

Stephan

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

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

Re: Methods for Creating Interactive Graphs

bryce hendrix-2
In reply to this post by lcota
On 04/06/2010 07:10 AM, luis cota wrote:
> I would like to create directed graphs (feed-forward networks) using
> the enthought suite, though I am unsure how to do this. I have been
> playing around with networkx module though this doesn't seem to allow
> the graphs to be interactive.  It is also unclear how to create graphs
> that have a clear left-to-right direction.
>
> Any suggestions?
>

You should have a look at the ETS package GraphCanvas. It was meant to
visualize networkx Graph instances, and includes interactions such as
double clicking to open a Traits view on the object represented by the
node. Its a pretty young project, and was written to scratch a
particular itch, but I tried to keep it general enough for others to
re-use it. There are a couple of examples in the package, let me know if
you have any questions or suggestions.

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

Re: Methods for Creating Interactive Graphs

lcota
In reply to this post by Stephan Gerhard
The purpose is to draw neural network topologies. As examples, you can see the enclosed images. The resulting image does not need 3D visualization - 2D visualization should suffice.

Let me know if these images describe the use-case better. In case they do not, let me know what format or what schema you'd like for me to create a graph to send along.

Thanks for the replies!

- Luis



On Tue, Apr 6, 2010 at 8:20 AM, Stephan Gerhard <[hidden email]> wrote:
Hi Luis!

I am working on the ConnectomeViewer, which is based on enthought suite
and uses Mayavi. It is for network analysis and visualization in
neuroimaging: http://www.connectomeviewer.org/

You should have a look at it. As far as interactivity is concerned you
can: select nodes / edges, define their colors, position the nodes in
space (i.e. using layouting algorithms or hand positioned, e.g. you
position your nodes form left-to-right). And you can have directed
graphs (but these are not yet tested well, since I dealt sofar mainly
with undirected ones.)

Currently, I'm investigating and developing what you are looking for. So
there is yet to come. I'd like to understand your use case. Maybe you
could provide me with a small network and what you want to do exactly
and I'll look into it.

In VTK, there are graph visualization techniques, which I try to
integrate into Mayavi/ConnectomeViewer, but this needs still some work.
I attach an example Python script to see in which direction this goes.
Possibility to have directed graphs exists.

> It is also unclear how to create graphs that have a clear
> left-to-right direction.

What do you mean by that?

Stephan

_______________________________________________
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

figure1.png (86K) Download Attachment
neural-network.png (53K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Methods for Creating Interactive Graphs

lcota
In reply to this post by bryce hendrix-2
Bryce,

I installed the Enthought Python Distribution for Mac - where can I find the GraphCanvas examples?

On Tue, Apr 6, 2010 at 11:11 AM, bryce hendrix <[hidden email]> wrote:
On 04/06/2010 07:10 AM, luis cota wrote:
> I would like to create directed graphs (feed-forward networks) using
> the enthought suite, though I am unsure how to do this. I have been
> playing around with networkx module though this doesn't seem to allow
> the graphs to be interactive.  It is also unclear how to create graphs
> that have a clear left-to-right direction.
>
> Any suggestions?
>

You should have a look at the ETS package GraphCanvas. It was meant to
visualize networkx Graph instances, and includes interactions such as
double clicking to open a Traits view on the object represented by the
node. Its a pretty young project, and was written to scratch a
particular itch, but I tried to keep it general enough for others to
re-use it. There are a couple of examples in the package, let me know if
you have any questions or suggestions.

Bryce
_______________________________________________
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: Methods for Creating Interactive Graphs

bryce hendrix-2
I just looked and it seems GraphCanvas was omitted from EPD. Ilan is writing up the build recipe, so it should be avialable via enpkg tomorrow and will be in the next EPD.

If you want to have a look at it in the meantime, you can check it out of svn:

https://svn.enthought.com/svn/enthought/GraphCanvas/trunk/

Bryce

On 04/06/2010 04:54 PM, luis cota wrote:
Bryce,

I installed the Enthought Python Distribution for Mac - where can I find the GraphCanvas examples?

On Tue, Apr 6, 2010 at 11:11 AM, bryce hendrix <[hidden email]> wrote:
On 04/06/2010 07:10 AM, luis cota wrote:
> I would like to create directed graphs (feed-forward networks) using
> the enthought suite, though I am unsure how to do this. I have been
> playing around with networkx module though this doesn't seem to allow
> the graphs to be interactive.  It is also unclear how to create graphs
> that have a clear left-to-right direction.
>
> Any suggestions?
>

You should have a look at the ETS package GraphCanvas. It was meant to
visualize networkx Graph instances, and includes interactions such as
double clicking to open a Traits view on the object represented by the
node. Its a pretty young project, and was written to scratch a
particular itch, but I tried to keep it general enough for others to
re-use it. There are a couple of examples in the package, let me know if
you have any questions or suggestions.

Bryce
_______________________________________________
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


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

Re: Methods for Creating Interactive Graphs

lcota
Just attempted to install GraphCanvas from the trunk and got these errors:

Traceback (most recent call last):
  File "setup.py", line 99, in <module>
    zip_safe = False,
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/install.py", line 76, in run
    self.do_egg_install()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/install.py", line 100, in do_egg_install
    cmd.run()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 263, in run
    self.easy_install(spec, not self.no_deps)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 747, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 801, in install_item
    self.process_distribution(spec, dist, deps)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 909, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/pkg_resources.py", line 543, in resolve
    requirements.extend(dist.requires(req.extras)[::-1])
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/pkg_resources.py", line 2072, in requires
    "%s has no such extra feature %r" % (self, ext)
pkg_resources.UnknownExtra: Traits 3.3.0 has no such extra feature 'ui'


On Tue, Apr 6, 2010 at 6:12 PM, bryce hendrix <[hidden email]> wrote:
I just looked and it seems GraphCanvas was omitted from EPD. Ilan is writing up the build recipe, so it should be avialable via enpkg tomorrow and will be in the next EPD.

If you want to have a look at it in the meantime, you can check it out of svn:

https://svn.enthought.com/svn/enthought/GraphCanvas/trunk/

Bryce


On 04/06/2010 04:54 PM, luis cota wrote:
Bryce,

I installed the Enthought Python Distribution for Mac - where can I find the GraphCanvas examples?

On Tue, Apr 6, 2010 at 11:11 AM, bryce hendrix <[hidden email]> wrote:
On 04/06/2010 07:10 AM, luis cota wrote:
> I would like to create directed graphs (feed-forward networks) using
> the enthought suite, though I am unsure how to do this. I have been
> playing around with networkx module though this doesn't seem to allow
> the graphs to be interactive.  It is also unclear how to create graphs
> that have a clear left-to-right direction.
>
> Any suggestions?
>

You should have a look at the ETS package GraphCanvas. It was meant to
visualize networkx Graph instances, and includes interactions such as
double clicking to open a Traits view on the object represented by the
node. Its a pretty young project, and was written to scratch a
particular itch, but I tried to keep it general enough for others to
re-use it. There are a couple of examples in the package, let me know if
you have any questions or suggestions.

Bryce
_______________________________________________
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


_______________________________________________
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: Methods for Creating Interactive Graphs

bryce hendrix-2
On 04/06/2010 06:02 PM, luis cota wrote:
Just attempted to install GraphCanvas from the trunk and got these errors:


Seems to work for me when I run 'setup.py develop', though that doesn't mean much in the setuptools world...  You can try to use the -N flag to tell setuptools to disregard dependencies, which should be met implicitly if you have EPD installed.

I spent a few minutes looking at the state of the package. The feature set is pretty minimal, though its easy to improve:

layout
-----------
 * tree
 * shell
 * circular
 * spring (default)

interactions
------------------
 * hover
 * double click to edit
 * zoom
 * pan

For the example you sent, the 'shell' layout may work for you, but if it doesn't, new layouts are pretty easy to add.

Bryce


Traceback (most recent call last):
  File "setup.py", line 99, in <module>
    zip_safe = False,
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/install.py", line 76, in run
    self.do_egg_install()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/install.py", line 100, in do_egg_install
    cmd.run()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 263, in run
    self.easy_install(spec, not self.no_deps)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 747, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 801, in install_item
    self.process_distribution(spec, dist, deps)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 909, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/pkg_resources.py", line 543, in resolve
    requirements.extend(dist.requires(req.extras)[::-1])
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/pkg_resources.py", line 2072, in requires
    "%s has no such extra feature %r" % (self, ext)
pkg_resources.UnknownExtra: Traits 3.3.0 has no such extra feature 'ui'


On Tue, Apr 6, 2010 at 6:12 PM, bryce hendrix <[hidden email]> wrote:
I just looked and it seems GraphCanvas was omitted from EPD. Ilan is writing up the build recipe, so it should be avialable via enpkg tomorrow and will be in the next EPD.

If you want to have a look at it in the meantime, you can check it out of svn:

https://svn.enthought.com/svn/enthought/GraphCanvas/trunk/

Bryce


On 04/06/2010 04:54 PM, luis cota wrote:
Bryce,

I installed the Enthought Python Distribution for Mac - where can I find the GraphCanvas examples?

On Tue, Apr 6, 2010 at 11:11 AM, bryce hendrix <[hidden email]> wrote:
On 04/06/2010 07:10 AM, luis cota wrote:
> I would like to create directed graphs (feed-forward networks) using
> the enthought suite, though I am unsure how to do this. I have been
> playing around with networkx module though this doesn't seem to allow
> the graphs to be interactive.  It is also unclear how to create graphs
> that have a clear left-to-right direction.
>
> Any suggestions?
>

You should have a look at the ETS package GraphCanvas. It was meant to
visualize networkx Graph instances, and includes interactions such as
double clicking to open a Traits view on the object represented by the
node. Its a pretty young project, and was written to scratch a
particular itch, but I tried to keep it general enough for others to
re-use it. There are a couple of examples in the package, let me know if
you have any questions or suggestions.

Bryce
_______________________________________________
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


_______________________________________________
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


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

Re: Methods for Creating Interactive Graphs

lcota
Hi Bryce, 

I just saw this message - deleting the GraphCanvas install fixed my other issues. Now back to getting GraphCanvas up and running

Thanks for the help

On Wed, Apr 7, 2010 at 11:23 AM, bryce hendrix <[hidden email]> wrote:
My guess is that the partial install of GraphCanvas is causing the problems. Can you try deleting the GraphCanvas install & let us know if you can import ETS packages again?

Ilan built a GraphCanvas egg, but we've discovered that networkx changed their API a bit since I wrote it. I'm updating the code now, hopefully we'll have a new egg in a few minutes.

Bryce


On 04/06/2010 07:48 PM, luis cota wrote:
python weighted.py&
[1] 95209
Luis-J-Cotas-MacBook:examples lcota$ Traceback (most recent call last):
  File "weighted.py", line 2, in <module>
    from enthought.graphcanvas.api import GraphView
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/GraphCanvas-0.1.0.dev_r0-py2.6.egg/enthought/graphcanvas/api.py", line 1, in <module>
    from graph_view import GraphView, graph_from_dict
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/GraphCanvas-0.1.0.dev_r0-py2.6.egg/enthought/graphcanvas/graph_view.py", line 3, in <module>
    from enthought.enable.api import ComponentEditor, Scrolled,Viewport
ImportError: No module named enable.api



-----------------------------------




On Tue, Apr 6, 2010 at 8:46 PM, luis cota <[hidden email]> wrote:
This is bizarre though despite those error messages it appears to have installed as enthought.graphcanvas (I had been trying enthought.GraphCanvas)

I will mess around with this now, thanks!


On Tue, Apr 6, 2010 at 7:15 PM, bryce hendrix <[hidden email]> wrote:
On 04/06/2010 06:02 PM, luis cota wrote:
Just attempted to install GraphCanvas from the trunk and got these errors:


Seems to work for me when I run 'setup.py develop', though that doesn't mean much in the setuptools world...  You can try to use the -N flag to tell setuptools to disregard dependencies, which should be met implicitly if you have EPD installed.

I spent a few minutes looking at the state of the package. The feature set is pretty minimal, though its easy to improve:

layout
-----------
 * tree
 * shell
 * circular
 * spring (default)

interactions
------------------
 * hover
 * double click to edit
 * zoom
 * pan

For the example you sent, the 'shell' layout may work for you, but if it doesn't, new layouts are pretty easy to add.

Bryce



Traceback (most recent call last):
  File "setup.py", line 99, in <module>
    zip_safe = False,
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/install.py", line 76, in run
    self.do_egg_install()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/install.py", line 100, in do_egg_install
    cmd.run()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 263, in run
    self.easy_install(spec, not self.no_deps)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 747, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 801, in install_item
    self.process_distribution(spec, dist, deps)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 909, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/pkg_resources.py", line 543, in resolve
    requirements.extend(dist.requires(req.extras)[::-1])
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/pkg_resources.py", line 2072, in requires
    "%s has no such extra feature %r" % (self, ext)
pkg_resources.UnknownExtra: Traits 3.3.0 has no such extra feature 'ui'


On Tue, Apr 6, 2010 at 6:12 PM, bryce hendrix <[hidden email]> wrote:
I just looked and it seems GraphCanvas was omitted from EPD. Ilan is writing up the build recipe, so it should be avialable via enpkg tomorrow and will be in the next EPD.

If you want to have a look at it in the meantime, you can check it out of svn:

https://svn.enthought.com/svn/enthought/GraphCanvas/trunk/

Bryce


On 04/06/2010 04:54 PM, luis cota wrote:
Bryce,

I installed the Enthought Python Distribution for Mac - where can I find the GraphCanvas examples?

On Tue, Apr 6, 2010 at 11:11 AM, bryce hendrix <[hidden email]> wrote:
On 04/06/2010 07:10 AM, luis cota wrote:
> I would like to create directed graphs (feed-forward networks) using
> the enthought suite, though I am unsure how to do this. I have been
> playing around with networkx module though this doesn't seem to allow
> the graphs to be interactive.  It is also unclear how to create graphs
> that have a clear left-to-right direction.
>
> Any suggestions?
>

You should have a look at the ETS package GraphCanvas. It was meant to
visualize networkx Graph instances, and includes interactions such as
double clicking to open a Traits view on the object represented by the
node. Its a pretty young project, and was written to scratch a
particular itch, but I tried to keep it general enough for others to
re-use it. There are a couple of examples in the package, let me know if
you have any questions or suggestions.

Bryce
_______________________________________________
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


_______________________________________________
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






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

Re: Methods for Creating Interactive Graphs

lcota
In reply to this post by bryce hendrix-2
Is there anyone that has been able to install GraphCanvas on Mac OSX? I just attemped to install it from Trunk and ran into the same problems from before, where "enable" cannot be found.  I have recently reformatted my system and installed EPD from the installer file.

import enable does not work from the python console. :(

- Luis

On Tue, Apr 6, 2010 at 10:49 PM, Bryce Hendrix <[hidden email]> wrote:
Maybe the partial install didn't set up the namespaces correctly? Some (most) days I really hate setuptools... I'm assuming you can import enthought.enable.api from the python prompt?

Bryce


On 4/6/2010 7:48 PM, luis cota wrote:
python weighted.py&
[1] 95209
Luis-J-Cotas-MacBook:examples lcota$ Traceback (most recent call last):
  File "weighted.py", line 2, in <module>
    from enthought.graphcanvas.api import GraphView
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/GraphCanvas-0.1.0.dev_r0-py2.6.egg/enthought/graphcanvas/api.py", line 1, in <module>
    from graph_view import GraphView, graph_from_dict
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/GraphCanvas-0.1.0.dev_r0-py2.6.egg/enthought/graphcanvas/graph_view.py", line 3, in <module>
    from enthought.enable.api import ComponentEditor, Scrolled,Viewport
ImportError: No module named enable.api



-----------------------------------




On Tue, Apr 6, 2010 at 8:46 PM, luis cota <[hidden email]> wrote:
This is bizarre though despite those error messages it appears to have installed as enthought.graphcanvas (I had been trying enthought.GraphCanvas)

I will mess around with this now, thanks!


On Tue, Apr 6, 2010 at 7:15 PM, bryce hendrix <[hidden email]> wrote:
On 04/06/2010 06:02 PM, luis cota wrote:
Just attempted to install GraphCanvas from the trunk and got these errors:


Seems to work for me when I run 'setup.py develop', though that doesn't mean much in the setuptools world...  You can try to use the -N flag to tell setuptools to disregard dependencies, which should be met implicitly if you have EPD installed.

I spent a few minutes looking at the state of the package. The feature set is pretty minimal, though its easy to improve:

layout
-----------
 * tree
 * shell
 * circular
 * spring (default)

interactions
------------------
 * hover
 * double click to edit
 * zoom
 * pan

For the example you sent, the 'shell' layout may work for you, but if it doesn't, new layouts are pretty easy to add.

Bryce



Traceback (most recent call last):
  File "setup.py", line 99, in <module>
    zip_safe = False,
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/install.py", line 76, in run
    self.do_egg_install()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/install.py", line 100, in do_egg_install
    cmd.run()
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 263, in run
    self.easy_install(spec, not self.no_deps)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 747, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 801, in install_item
    self.process_distribution(spec, dist, deps)
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 909, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/pkg_resources.py", line 543, in resolve
    requirements.extend(dist.requires(req.extras)[::-1])
  File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/pkg_resources.py", line 2072, in requires
    "%s has no such extra feature %r" % (self, ext)
pkg_resources.UnknownExtra: Traits 3.3.0 has no such extra feature 'ui'


On Tue, Apr 6, 2010 at 6:12 PM, bryce hendrix <[hidden email]> wrote:
I just looked and it seems GraphCanvas was omitted from EPD. Ilan is writing up the build recipe, so it should be avialable via enpkg tomorrow and will be in the next EPD.

If you want to have a look at it in the meantime, you can check it out of svn:

https://svn.enthought.com/svn/enthought/GraphCanvas/trunk/

Bryce


On 04/06/2010 04:54 PM, luis cota wrote:
Bryce,

I installed the Enthought Python Distribution for Mac - where can I find the GraphCanvas examples?

On Tue, Apr 6, 2010 at 11:11 AM, bryce hendrix <[hidden email]> wrote:
On 04/06/2010 07:10 AM, luis cota wrote:
> I would like to create directed graphs (feed-forward networks) using
> the enthought suite, though I am unsure how to do this. I have been
> playing around with networkx module though this doesn't seem to allow
> the graphs to be interactive.  It is also unclear how to create graphs
> that have a clear left-to-right direction.
>
> Any suggestions?
>

You should have a look at the ETS package GraphCanvas. It was meant to
visualize networkx Graph instances, and includes interactions such as
double clicking to open a Traits view on the object represented by the
node. Its a pretty young project, and was written to scratch a
particular itch, but I tried to keep it general enough for others to
re-use it. There are a couple of examples in the package, let me know if
you have any questions or suggestions.

Bryce
_______________________________________________
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


_______________________________________________
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






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