How to write a caption under two graphics

Posted 3 years ago
4911 Views
|
8 Replies
|
0 Total Likes
|
 I made two graphics in http://demonstrations.wolfram.com/KnotPatternSimilarToALotusKolam/I would like to write a caption in the common bottom of these two graphics to copy them with the caption for publishing them in other papers.Would you teach me how to write such a caption as "Torus knot (left) and Lotus Kolam (right) 12 leaves, 5 periods, 1 loop, and 46 crossings", instead of the present labels of each upper side of two graphics?These variables are changed with animation control bars of n and l, and the results.I could write a label in a graphic like http://demonstrations.wolfram.com/LissajousLikeKolam/ but for one graphic. Attachments:
8 Replies
Sort By:
Posted 3 years ago
 One possible way is to use Labeled g1 = Plot[Sin[x], {x, -2 Pi, 2 Pi}, Frame -> True, FrameLabel -> {{"f(x)", None}, {"x", "sin(x)"}}]; g2 = Plot[Cos[x], {x, -2 Pi, 2 Pi}, Frame -> True, FrameLabel -> {{"f(x)", None}, {"x", "cos(x)"}}]; g = Grid[{{g1, g2}}]; Framed@Labeled[g, Style["My amazing plots", Red, 16], Alignment -> {Bottom, Center}] You can also use just Grid, like this lbl = Style["My amazing plots", Red, 16]; Framed@Grid[{{g1, g2}, {lbl, SpanFromLeft}}, Alignment -> Center] 
Posted 3 years ago

Dear Abassi

Thank you very much for your help. I tried your advice in my current code, ----- (* changed from Grid[ List@{ Show[ *) Framed@Labeled[ Grid[ List@{ Show[ If[lop == 1, {plm, p21, par}, {}], If[lop == 2, {plm, p21, p22, par, par2}, {}], If[lop >= 3, {plm, p21, p22, p23, par, par2, par3}, {}] ], klm}], (end of Module )
Style["My amazing plots", blue, 20], Bottom]],

(* here "lop" is the number of loops, "plm, p21, p22, p23, par, par2, and par3" are parts of a Torus Knot graphic, and "klm" is a graphic of Kolam pattern *)

and got the caption in the graphic (refer caption failed). The construction is OK but the message could not be written in the capiable area of the graphic and and not correct. I would like to write variables of n, l and the result values GCD[n, l] and the number of the crossings n*(l - 1). I am showing captions I want, in the attached image (refer caption I want). Would you please correct my code ? I attached the version 5.2 getting your second advice. thank you very much again in advance.

Nagata,

Attachments:
Posted 3 years ago
 Dear Abassi Thank you very much for your help. I tried your advice in my current code, -----  (* changed from Grid[ List@{ Show[ *) Framed@Labeled[ Grid[ List@{ Show[ If[lop == 1, {plm, p21, par}, {}], If[lop == 2, {plm, p21, p22, par, par2}, {}], If[lop >= 3, {plm, p21, p22, p23, par, par2, par3}, {}] ], klm}], (*end of Module *) Style["My amazing plots", blue, 20], Bottom]], (* here "lop" is the number of loops, "plm, p21, p22, p23, par, par2, and par3" are parts of a Torus Knot graphic, and "klm" is a graphic of Kolam pattern *)  and got the caption in the graphic (refer caption failed). The construction is OK but the message could not be written in the capiable area of the graphic and and not correct. I would like to write variables of n, l and the result values GCD[n, l] and the number of the crossings n*(l - 1). I am showing captions I want, in the attached image (refer caption I want). Would you please correct my code ? I attached the version 5.2 getting your second advice. thank you very much again in advance.Nagata,
Posted 3 years ago

Dear Abassi thank you very much for your help

----- (* changed from Grid[ List@{ Show[ *) Framed@Labeled[ Grid[ List@{ Show[ If[lop == 1, {plm, p21, par}, {}], If[lop == 2, {plm, p21, p22, par, par2}, {}], If[lop >= 3, {plm, p21, p22, p23, par, par2, par3}, {}] ], klm}], (end of Module )

Style["My amazing plots", blue, 20], Bottom]], (* here "lop" is the number of loops, "plm, p21, p22, p23, par, par2, and par3" are parts of a Torus Knot graphic, and "klm" is a graphic of Kolam pattern *)

and got the caption in the graphic (refer caption failed). The construction is OK but the message could not be written in the capiable area of the graphic and and not correct. I would like to write variables of n, l and the result values GCD[n, l] and the number of the crossings n*(l - 1). I am showing captions I want, in the attached image (refer caption I want). Would you please correct my code ? I attached the version 5.2 getting your second advice. thank you very much again in advance.

Nagata,

Posted 3 years ago
 Dear Abassi or anyone interesting in. I revised the last code to the new ver 5.3 resulting the attached nb and image. But not completed. There are some extra messages e.g. Grid[, {{ , }}, and Alignment->Center]. and also the common variables can not been copied with these graphics. Would you teach me ? How to remove the extra messages, and write the common variables which can been copied with them.Nagata, Attachments:
Posted 3 years ago
 Dear Abassi or anyone interesting in. I revised again the last code to the new ver 5.4 resulting the attached nb and image. I got the caption of the common variables. But not completed. They can not been copied with these graphics inside of the red line areas. Would you teach me ? How to write the common variables which can been copied with the graphics.Nagata, label = StringTemplate["1 leaves 2 periods 3 loop(s) 4 crossings by S.N."] [nn, ln, lop, nn (ln - 1)]; Framed@Labeled[ Grid[List@{ Show[ If[lop == 1, {plm, p21, par}, {}], If[lop == 2, {plm, p21, p22, par, par2}, {}], If[lop >= 3, {plm, p21, p22, p23, par, par2, par3}, {}] ], klm}], Style[label, Blue, Bold, 18], Bottom]  Attachments: