Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Preserving labels when using graph functions

I'm using

g = SocialMediaData["Twitter", "FriendNetwork"] 

to get a nice graph with tooltips for the vertices, etc. Next, I get the weakly connected components via

wcc = WeaklyConnectedComponents[g]

and then I do

sg = Subgraph[g, wcc[[1]]]

to get the largest component. But, all the properties are gone in sg, i.e. I no longer have the tooltips, etc.

Any suggestions?

share|improve this question

marked as duplicate by Sjoerd C. de Vries, Oleksandr R., whuber, R. M. Dec 6 '12 at 3:22

This question was marked as an exact duplicate of an existing question.

Found it!

Subgraph[g, wcc[[1]], Options[g]]
share|improve this answer
You can format your code by starting it with 4 spaces or selecting the text and hitting CTRL+K. See my edit in your question. – István Zachar Dec 5 '12 at 20:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.