Orange Forum • View topic - Adding labels to network explorer

Adding labels to network explorer

A place to ask questions about methods in Orange and how they are used and other general support.

Adding labels to network explorer

Postby Sharapolas » Wed Jul 17, 2013 17:16

Dear all,

I've been exploring Network-addon and am unable to plot labels in the Net explorer.

I have an dataTable of examples with a couple of meta attributes. I compute the distance matrix and put it into Orange.misc.SymMatrix. The SymMatrix is connected then to Net From distances and then to Net Explorer.

If I connect the dataTable to Net Explorer I get the following error:

Code: Select all
/usr/local/lib/python2.7/dist-packages/_network/widgets/OWNxHist.py:109: AttributeWarning: 'items' is not a builtin attribute of 'Orange.core.SymMatrix'
  setattr(data, "items", [i for i in range(data.dim)])
--------------------------------------------------------------------------------
AttributeError                                Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Orange/OrangeCanvas/scheme/widgetsscheme.py", line 588, in event
    return SignalManager.event(self, event)
  File "/usr/local/lib/python2.7/dist-packages/Orange/OrangeCanvas/scheme/signalmanager.py", line 450, in event
    self.process_queued(max_nodes=1)
  File "/usr/local/lib/python2.7/dist-packages/Orange/OrangeCanvas/scheme/widgetsscheme.py", line 362, in process_queued
    SignalManager.process_queued(self, max_nodes=max_nodes)
  File "/usr/local/lib/python2.7/dist-packages/Orange/OrangeCanvas/scheme/signalmanager.py", line 314, in process_queued
    self.process_node(node)
  File "/usr/local/lib/python2.7/dist-packages/Orange/OrangeCanvas/scheme/signalmanager.py", line 333, in process_node
    self.send_to_node(node, signals_in)
  File "/usr/local/lib/python2.7/dist-packages/Orange/OrangeCanvas/scheme/widgetsscheme.py", line 349, in send_to_node
    self.process_signals_for_widget(node, widget, signals)
  File "/usr/local/lib/python2.7/dist-packages/Orange/OrangeCanvas/scheme/widgetsscheme.py", line 405, in process_signals_for_widget
    handler = getattr(widget, handler)
AttributeError: 'OWNxExplorerQwt' object has no attribute 'set_items'


My question is how to fix the Net Explorer and write the method set_items or how to add labels to SymMatrix

Thanks, will be looking forward to reply

Re: Adding labels to network explorer

Postby Sharapolas » Thu Jul 18, 2013 15:59

Fixed the issue:

Say you have a SymMatrix called data. Then just setattr("items",item_data) where item_data is Orange.data.Table with your data

Re: Adding labels to network explorer

Postby miha » Fri Jul 19, 2013 9:32

I am looking into your problem. Can you please tell me which OS are you running?

Re: Adding labels to network explorer

Postby miha » Fri Jul 19, 2013 13:33

I fixed the set_items related bug. Just update the add-on.

You are using the old version of Net Explorer. Both (the old and the new) are included in the add-on.
The new version of Net Explorer is available automatically if you have orangeqt lib in your Python path. I suggest you install the orangeqt lib.

I can help you with installation if you tell me which OS you are using and how you installed orange in the first place.

Re: Adding labels to network explorer

Postby Sharapolas » Fri Jul 19, 2013 20:46

Hi Miha,

Thank you for your updates. Now in order to run it I did the following today:

Downloaded fresh snapshot of Nightly source from the Orange website, extracted it and installed orangeqt by manipulating source/orangeqt/setup.py as mentioned here http://orange.biolab.si/forum/viewtopic.php?f=4&t=1731 and running

Code: Select all
 sudo python setup.py build_pyqt_ext build install


Now I have a slightly different Net Explorer (prob, the one you refer to as the new one). Everything works as expected. Hurray!

Tho, might be working with this for a while so I expect to discover more bugs and will keep you informed about them :)

Btw, I am running Ubuntu 12.04.2 LTS.

Thanks,
Sarunas

Re: Adding labels to network explorer

Postby Sharapolas » Thu Aug 01, 2013 11:21

Dear miha,

I set up Orange on Ubuntu 12.10 on a server in the cloud. Then I ssh'ed to it with the -X option and was able to succesfully install Orange with all addons and launched it. However, two Net Explorer and Net from distances are missing. How could I fix this?

Sarunas

Re: Adding labels to network explorer

Postby miha » Thu Aug 08, 2013 11:47

You should install the Orange Network add-on: https://pypi.python.org/pypi/Orange-Network

Best wishes

Miha


Return to Questions & Support



cron