Group Abstract Group Abstract

Message Boards Message Boards

How can I remove Tooltips from a list of values?

Posted 4 days ago

I have a list of elements to create graphs (interconnected watersheds). I added Tooltips to the list to easily identify each element. Now I want to remove the tooltips from the list or elements in order to do several operations, such as removing non numeric values.

I am unable to remove the tooltips and therefore the elements are not recognized as integers or strings. I tried Tooltip[ exp, ""], but didn´t work.

Please see attached notebook.

2 Replies

Thank you Michael. Yes, it works!

Does this do what you need done?:

new = con /. Tooltip[val_,tip_] :> val;

Inspect the first elements and compare:

con[[1]] // FullForm
new[[1]] // FullForm
(*
List[
  Rule[Tooltip[101,"Tijuana"], 
       Tooltip["EUA02","Tijuana River"]],
  Rule[Tooltip["EUA01","R\[IAcute]o Unanua, arroyo Alamar, otros"], 
       Tooltip[101,"Tijuana"]]
  ]

List[Rule[101,"EUA02"], Rule["EUA01",101]]
*)
POSTED BY: Michael Rogers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard