Closed yiluheihei closed 5 years ago
Thanks for your question. Anything you can do using cyREST, you should be able to do using RCy3. Sometimes, there is higher-level helper function and sometimes you just have to use the cyrest*** methods directly.
For example, in this case, the first thing I did was open up the cyREST API with cyrestAPI()
function and then browsed under Visual Styles to find the DELETE method you are looking for. Then I composed this command:
cyrestDELETE('styles/galFiltered Style/mappings/NODE_LABEL')
# note: the second path arg is the name of the visual style you are working with and the fourth is the name of the visual property.
Voila!
@AlexanderPico Thank you so much for your prompt reply.
According to your explanation, the edge label can be removed by setting the default unmapped edge label to ""
using setEdgeLabelDefault()
and remove the mapped edge label using cyrestDELETE()
setEdgeLabelDefault("", <visual style>)
cyrestDELETE(paste("styles", <visual style>, "mappings", "EDGE_LABEL", sep="/")
Thanks for your great work!
I can't find the api to remove labels of nodes or edges after reading the help page? Is there have something I have missed?
Thank you very much.