Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preserve Tooltips when exporting GraphPlot

I have a very large, dense, labeled graph that I have visualized with GraphPlot. I would like to show the vertex labels with Tooltip, but must distribute them to people without Mathematica. Unfortunately Tooltips are stripped when exporting to PDF.

I next tried exporting to HTML. The tooltips are preserved, but when my graph is converted to a .gif, it is too small to see. Is there a way to specify the size of images when exporting to HTML?

Or, can anyone help me figure out how to export to a different format while preserving Tooltips?

Thanks!

like image 836
tba Avatar asked Jan 12 '12 07:01

tba


1 Answers

You merely need to specify an explicit ImageSize. This can be given in the initial GraphPlot, or amended using Show as follows:

gp =
 GraphPlot[
   {3 -> 4, 3 -> 5, {3 -> 6, "edge 3->6"}, 4 -> 6, 5 -> 6},
   EdgeLabeling -> Automatic
 ]

Export["graphplot.html", Show[gp, ImageSize -> 800], "HTML"]
like image 86
Mr.Wizard Avatar answered Nov 16 '22 21:11

Mr.Wizard