Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

When I need to plot a 'large' graph with CommunityGraphPlot the output is always sized at the Mathematica default value. The Graph object itself can be resized with ImageSize option. However that doesn't work with Mathematica 9.0.0. The only option is to enlarge the plot by clicking the image and pull it to the wanted size. Then you can export this graph to PDF and print it. Is there a alternative way?

g = RandomGraph[{200, 300}, VertexLabels -> "Name",ImagePadding -> 20, ImageSize -> Scaled[0.5]]

enter image description here

CommunityGraphPlot[g]

enter image description here

UPDATE: I just found out that the CommunityGraphPlot generated can be double clicked and then you can freely drag the vertexes etc while keeping the connections! Can't do that with Graph object by default.

share|improve this question

2 Answers 2

This is luckily fixed with Mathematica 9.0.1

g = RandomGraph[{200, 300}, VertexLabels -> "Name",ImagePadding -> 20, ImageSize -> Scaled[0.5]]

enter image description here

CommunityGraphPlot[g]

enter image description here

share|improve this answer
    
In 9.0.0, you could do Show[CommunityGraphPlot[g], ImageSize -> Scaled[0.5]] –  halmir Mar 15 '13 at 15:44
    
@halmir Well why didn't I think of that... :) –  Lou Mar 15 '13 at 15:48
    
@halmir post it as an answer too. I'll give you a point. –  Lou Mar 15 '13 at 15:50

As Lou mentioned it's fixed in v 9.0.1. But in v 9.0.0, you could use Show to do that

g = RandomGraph[{200, 300}, VertexLabels -> "Name",ImagePadding -> 20, ImageSize -> Scaled[0.5]]

Show[CommunityGraphPlot[g], ImageSize -> Scaled[0.5]] 
share|improve this answer
    
I updated the question with a remark. Didn't know the communitygraph object can be dragged and dropped like a graph 'editor'. This is great! –  Lou Mar 15 '13 at 16:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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