Continuous mapping on node colors

38 views
Skip to first unread message

Lilit Nersisyan

unread,
Oct 24, 2015, 8:34:51 AM10/24/15
to cytoscape-helpdesk
Dear all, 

I am using continuous mapping on node fill colors to color the network programmatically. The mapping is performed successfully, but on some nodes of the network it does not work. The following is Strange. 
After setting the continuous mapper programmatically, I refer to the Cytoscape UI, go the Style tab, and open the current mapping window. All the handles and colors are set correctly. However, only when I click on on of the handles, the whole network is re-colored correctly. I do nothing but clicking on the handle, so no colors or handle positions are changed. 

Could you, please, provide a clue on what's happening. Attached is the peace of code I use for continuous mapping. If needed, I can also provide the app and the input network. 

Thanks
With regards, 
Lilit 

srikanth bezawada

unread,
Oct 24, 2015, 8:43:17 AM10/24/15
to cytoscape...@googlegroups.com
Hi Lilit,

You haven't attached the snippet :)

Thanks,
Srikanth.B.


--
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/d/optout.

Lilit Nersisyan

unread,
Oct 24, 2015, 9:41:05 AM10/24/15
to cytoscape-helpdesk

I'm sorry, here it is :) 



On Saturday, October 24, 2015 at 2:43:17 PM UTC+2, srikanth wrote:
Hi Lilit,

You haven't attached the snippet :)

Thanks,
Srikanth.B.


On Sat, Oct 24, 2015 at 6:04 PM, Lilit Nersisyan <txgt.lilit...@gmail.com> wrote:
Dear all, 

I am using continuous mapping on node fill colors to color the network programmatically. The mapping is performed successfully, but on some nodes of the network it does not work. The following is Strange. 
After setting the continuous mapper programmatically, I refer to the Cytoscape UI, go the Style tab, and open the current mapping window. All the handles and colors are set correctly. However, only when I click on on of the handles, the whole network is re-colored correctly. I do nothing but clicking on the handle, so no colors or handle positions are changed. 

Could you, please, provide a clue on what's happening. Attached is the peace of code I use for continuous mapping. If needed, I can also provide the app and the input network. 

Thanks
With regards, 
Lilit 

--
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.
continous.mapping.problem.java

Scooter Morris

unread,
Oct 25, 2015, 12:02:06 PM10/25/15
to cytoscape...@googlegroups.com
Hi Lilit,
    I've seen the same thing, but haven't had a chance to track it down.  What I've found is that I can get things to work more reliably by adding the style to the visual style manager using "addVisualStyle".  You also need to make sure that you've provided a name for the style.  Can you see if that helps?

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

Lilit Nersisyan

unread,
Oct 25, 2015, 7:12:33 PM10/25/15
to cytoscape-helpdesk
Hi Scooter, 

In fact, I applied the mapping on the current visual style, rather than creating a new one. 
However, I also tried to create a new one with its name and call "addVisualStyle", unfortunately, that didn't help. 

Would appreciate additional suggestions to play around with. 

Thank you, 
Lilit


On Sunday, October 25, 2015 at 6:02:06 PM UTC+2, Scooter Morris wrote:
Hi Lilit,
    I've seen the same thing, but haven't had a chance to track it down.  What I've found is that I can get things to work more reliably by adding the style to the visual style manager using "addVisualStyle".  You also need to make sure that you've provided a name for the style.  Can you see if that helps?

-- scooter

On 10/24/2015 06:41 AM, Lilit Nersisyan wrote:

I'm sorry, here it is :) 


On Saturday, October 24, 2015 at 2:43:17 PM UTC+2, srikanth wrote:
Hi Lilit,

You haven't attached the snippet :)

Thanks,
Srikanth.B.


On Sat, Oct 24, 2015 at 6:04 PM, Lilit Nersisyan <txgt.lilit...@gmail.com> wrote:
Dear all, 

I am using continuous mapping on node fill colors to color the network programmatically. The mapping is performed successfully, but on some nodes of the network it does not work. The following is Strange. 
After setting the continuous mapper programmatically, I refer to the Cytoscape UI, go the Style tab, and open the current mapping window. All the handles and colors are set correctly. However, only when I click on on of the handles, the whole network is re-colored correctly. I do nothing but clicking on the handle, so no colors or handle positions are changed. 

Could you, please, provide a clue on what's happening. Attached is the peace of code I use for continuous mapping. If needed, I can also provide the app and the input network. 

Thanks
With regards, 
Lilit 

--
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+unsubscribe@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/d/optout.

Lilit Nersisyan

unread,
Oct 26, 2015, 8:52:42 AM10/26/15
to cytoscape-helpdesk
Dear Scooter and all, 

I think the problem is that the order in which the continuous mapping points are set matters. When I change the order, the mapping is changed. Also I'm a bit confused about how to set the mapping with three points. What I would like to do is have a mapping with three color definitions, in the range of defined minimum, middle and maximum node values. 

BoundaryRangeValues<Paint> brvMin = new BoundaryRangeValues<Paint>(minNodeColor, minNodeColor, midNodeColor);
nodeColorMapping.addPoint(minNodeSignal, brvMin);

BoundaryRangeValues<Paint> brvMid = new BoundaryRangeValues<Paint>(minNodeColor, midNodeColor, maxNodeColor);
nodeColorMapping.addPoint(midNodeSignal, brvMid);

BoundaryRangeValues<Paint> brvMax = new BoundaryRangeValues<Paint>(midNodeColor, maxNodeColor, maxNodeColor);
nodeColorMapping.addPoint(maxNodeSignal, brvMax);

What is the correct way of setting this? Both the order in which the points are added, as well as the color range for each point matters. E.g. when i change

BoundaryRangeValues<Paint> brvMax = new BoundaryRangeValues<Paint>(midNodeColor, maxNodeColor, maxNodeColor); 

to 

BoundaryRangeValues<Paint> brvMax = new BoundaryRangeValues<Paint>(maxNodeColor, maxNodeColor, maxNodeColor); 

The mapping is more accurate, but still not so correct. The colors still get recovered after clicking on the handle. 

Thanks, 
Lilit 
Reply all
Reply to author
Forward
0 new messages