# Using a List in PlotLabel which goes beyond width of ImageSize

My PlotLabel goes beyond the width of the ImageSize. The label is generated into a List form by my program. I hope to allow my PlotLabel to go to a second, third, fourth (...) line if it reaches beyond the boundaries. My problem in simplified, working code:

testList = {1.1, 1.2100000000000002, 1.4641000000000004,
2.143588810000001, 4.594972986357221, 21.1137767453526,
445.7915684525922, 198730.12250342217, 3.949366159022518*^10,
1.5597493058032278*^21, 2.432817896953651*^42,
5.918602919737985*^84, 3.5029860521531003*^169,
1.2270911281579163468674816474213106841944620595434115.\
653559774527023*^339,
1.5057526368038678804394522151149996181314615.352529778863042*^\
678, 2.267291003241800856581079591813116877525595663615.\
051499783199061*^1356,
5.140608493381211822346417851332928514.75046978753508*^2712,
2.6425855682223052512317328042874404006080140549740414.\
449439791871098*^5425,
6.9832584853768039212406022892095208921115614.148409796207117*^\
10850, 4.876589907358713358551139652032791543825497271813.\
847379800543136*^21701};
Plot[x^2, {x, -3, 3},
PlotLabel -> StringForm["The orbit of x=1.1 is\n\n", testList ],
ImageSize -> {600, 600}]


-

If you create a TextCell then it will wrap the list nicely. PageWidth controls the width of the text cell.

Plot[x^2, {x, -3, 3}, PlotLabel ->
StringForm["The orbit of x=1.1 is\n\n", TextCell[testList, PageWidth -> 600]],
ImageSize -> {600, 600}]


You can change the appearance of the TextCell (font, fontsize, color, etc) using various options as shown in the help files for TextCell and Cell.

-
The copied code sends my list to two lines instead of one, but still goes beyond the viewable area. – twhoward99 Jun 5 '13 at 16:25
Above is the picture I got. You know.. if you play with the window width it changes the layout of the textcell. Maybe my default window width is different from yours... – bill s Jun 5 '13 at 16:27
Could I change the width of the TextCell? Its for a .cdf file and the output size needs to be constrained somewhat. – twhoward99 Jun 5 '13 at 16:32
See the change -- this one gives me the same picture, but now the width of the textcell is specified (and it doesn't change when you resize the window). – bill s Jun 5 '13 at 16:35
Works like a charm! Thank-you very much! – twhoward99 Jun 5 '13 at 16:40

Slightly better than my last attempt:

Row[{
Plot[x^2, {x, -3, 3}, ImageSize -> {400, 400}],
Panel[testList, "The orbit of x=1.1 is", Top,
ImageSize -> {400, 120}]
}]


-
Nice solution!! – twhoward99 Jun 5 '13 at 16:41

A nine-character solution: add ~Pane~600 to the end of the PlotLabel.

-