Labels behind nodes

416 views
Skip to first unread message

Erik Wright

unread,
Sep 13, 2013, 5:41:19 PM9/13/13
to cytoscape...@googlegroups.com
Hello,

I am a newbie at Cytoscape, and despite my efforts I cannot find an answer to this simple question.  Currently all of my nodes appear on top of my node labels.  I would like to bring the node labels to the front.  Is there a way to do this automatically?

Thanks in advance,
Erik


Alexander Pico

unread,
Sep 14, 2013, 2:27:41 PM9/14/13
to cytoscape...@googlegroups.com
Do you mean that for a given node the label is behind the node? That's odd. I don't know how to even do that. The expected behavior is for a node's label to be in front. Can you provide installation, OS and Java version details, and perhaps a screenshot?

 - Alex

--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at http://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/groups/opt_out.

Erik Wright

unread,
Sep 14, 2013, 7:36:48 PM9/14/13
to cytoscape...@googlegroups.com
Hi Alex,

Yes, some of the node labels are appearing behind other nodes (not their own node).  I have attached an example of a blue node appearing through a yellow label (zoomed-in).  I was hoping there was a way to make all of the node labels come to the foreground.

Mac OS 10.6.8
Cytoscape 2.8.3
$ java -showversion
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-10M4509)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

Thanks,
Erik


On Saturday, September 14, 2013 1:27:41 PM UTC-5, Alexander Pico wrote:
Do you mean that for a given node the label is behind the node? That's odd. I don't know how to even do that. The expected behavior is for a node's label to be in front. Can you provide installation, OS and Java version details, and perhaps a screenshot?

 - Alex

On Sep 13, 2013, at 2:41 PM, Erik Wright <digita...@gmail.com> wrote:

Hello,

I am a newbie at Cytoscape, and despite my efforts I cannot find an answer to this simple question.  Currently all of my nodes appear on top of my node labels.  I would like to bring the node labels to the front.  Is there a way to do this automatically?

Thanks in advance,
Erik



--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpdesk+unsub...@googlegroups.com.
Screen shot 2013-09-14 at 6.34.00 PM.png

Gary Bader

unread,
Sep 15, 2013, 8:02:58 PM9/15/13
to cytoscape...@googlegroups.com
Hi Erik - are you using transparency on the nodes?  Also, would you mind sending a zoomed out screenshot?

Thanks,
Gary


To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.

To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at http://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/groups/opt_out.



--
http://baderlab.org
The Donnelly Centre - http://www.thedonnellycentre.utoronto.ca/
University of Toronto

Erik Wright

unread,
Sep 16, 2013, 7:46:45 AM9/16/13
to cytoscape...@googlegroups.com
Hi Gary,

Yes, I am using a global node opacity of 100 (out of 255).  I have attached a zoomed-out screenshot of the same region.  The labels are on top of some nodes, but not all.

Erik

 - Alex

To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpdesk+unsubscribe@googlegroups.com.
To post to this group, send email to cytoscape...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpdesk+unsub...@googlegroups.com.
To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at http://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/groups/opt_out.



--
Screen shot 2013-09-16 at 6.43.07 AM.png

Gary Bader

unread,
Sep 16, 2013, 12:03:50 PM9/16/13
to cytoscape...@googlegroups.com
Hi Erik,
What I think is happening is that because you are making the nodes somewhat transparent, you are seeing the label from another node through the top node. Cytoscape needs to maintain an internal ordering of nodes on the 'z-layer' (top to bottom), but currently that is not fully controllable by the user to maintain performance optimizations. If you set node opacity back to 255, then you should see what I mean. Does that make sense?

Gary
>> To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
>> To post to this group, send email to cytoscape...@googlegroups.com.
>>
>> Visit this group at http://groups.google.com/group/cytoscape-helpdesk.
>> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
> To post to this group, send email to cytoscape...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cytoscape-helpdesk.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> --
> http://baderlab.org
> The Donnelly Centre - http://www.thedonnellycentre.utoronto.ca/
> University of Toronto
>
> --
> You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
> To post to this group, send email to cytoscape...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cytoscape-helpdesk.
> For more options, visit https://groups.google.com/groups/opt_out.
> <Screen shot 2013-09-16 at 6.43.07 AM.png>

Erik Wright

unread,
Sep 16, 2013, 1:40:44 PM9/16/13
to cytoscape...@googlegroups.com
Hi Gary,

Thanks for your help.  I tried setting node opacity back to 255, and now the original "problem nodes" completely block the labels.  I suspect this is what you expected would happen.

My understanding is that Cytoscape has an internal z-ordering that is placing some nodes atop other nodes' labels.  This is expected to happen even though the node label opacity is set to 255.

Is there any way to fix this other than individually moving every overlapping node out of the way?  Could I reorder my network somehow such that the z-height of labeled nodes is in the foreground?

In other words, how does Cytoscape determine the z-order and is there a clever way to manipulate it?

Thanks again,
Erik
>> To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpdesk+unsub...@googlegroups.com.
>> To post to this group, send email to cytoscape...@googlegroups.com.
>>
>> Visit this group at http://groups.google.com/group/cytoscape-helpdesk.
>> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpdesk+unsub...@googlegroups.com.
> To post to this group, send email to cytoscape...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cytoscape-helpdesk.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> --
> http://baderlab.org
> The Donnelly Centre - http://www.thedonnellycentre.utoronto.ca/
> University of Toronto
>
> --
> You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpdesk+unsub...@googlegroups.com.

Gary Bader

unread,
Sep 16, 2013, 7:49:44 PM9/16/13
to cytoscape...@googlegroups.com
Hi Erik,
   Unfortunately Cytoscape currently doesn't allow a user to manipulate the z-ordering because the rendering engine optimizes screen painting based on it.  It's a requested feature, so a future rendering engine may allow you to do this.  In the meantime, probably the best option is to arrange the network view to your liking and then save as PDF and load into a drawing program like Adobe Illustrator and fix the node labels manually (I haven't tested that with node opacity, but it should work).

Gary


To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.

To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at http://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages