Group Abstract Group Abstract

Message Boards Message Boards

0
|
13.3K Views
|
12 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to copy a label underneath two graphics with the graphics?

Attachments:
POSTED BY: Nagata Hannya
12 Replies

Dear All, I got the following code. I think this consists of a simple structure of "label = Style[..]" and
" Labeled[ Grid[..], label, Bottom]". It was based on these discussions and modified from the advice by the technical support of Wolfram. Thank again.

Manipulate[
  label = Style[
                Row[{"X-axis width of ", y, If[y == 1, " Pi-unit", " Pi-units"], 
                "(left) and ", w, If[w == 1, " Pi-unit", " Pi-units"], "(Right)"}
                ], FontSize -> 18, Bold, Blue]; (*endof Style*)
  Labeled[
      Grid[{{   (*the sample graphics*)
            Show[Plot[Sin[x], {x, 0, y*Pi}], ImageSize ->Small],         
            Show[Plot[Cos[x], {x, 0, w*Pi}], ImageSize -> Medium]}}
       ],(*endof Grid*)
       label, Bottom (*Can be Bottom, Left, Top, or Right*)
    ],(*endof Labeled*)
   {y, 1, 10, 1}, {w, 1, 10, 1}
](*endof Manipulate*)
POSTED BY: Nagata Hannya

thanks Patrik Ekenberg-san I tried

label = StringTemplate[
"`1` leaves `2` periods `3` <*If[`3`== 1,\"loop\",\"loops\"]*> `4` crossings     S.N."]  [nn, ln, lop, nn (ln - 1)];

I got what I want. (please neglect the attached images. I don't know how to remove them) thanks again

Attachments:
POSTED BY: Nagata Hannya

Dear All the previous message "the original code was correct" was not correct. As the code

label = StringTemplate["`1` leaves `2` periods `3` loop(s) `4` crossings by S.N."]
          [nn, ln, lop, nn (ln - 1)];

can not change automatically a singular or plural form of the unit "loop", like the following.

captn = Graphics[      
ImageSize -> {380, 20},
PlotLabel -> Style[Row[{nn, " leaves, ", ln, " periods, ", lop, If[ lop == 1, " loop, ", " loops, "], nn(ln - 1), 
" crossings     S.N."}], FontSize -> 18, Blue]   ];

I return to the previous code again of the label (caption) as a label of a Graphic..

POSTED BY: Nagata Hannya
POSTED BY: Patrik Ekenberg

Dear Patrik Ekenberg-san and David Keith-san I found the original code in this discussion was good for copying (getting) an entire image including any messages and manipulation bars on one operation of cell-copy of a graphic-cell. thanks again Nagata,

POSTED BY: Nagata Hannya

Dear David Keith -san Thank you very much for teaching the nice method to copy (get) an entire image as a cell of the graphics including any messages and manipulation bars once operation.

POSTED BY: Nagata Hannya

additional post by Nagata,

My code makes three graphics, the third one is only 4 variable-labels underneath the graphics. and I copy each graphic as an image using the Mouse right menu (copy the graphic) and combine them to one image using another painting software. Thank all. Nagata

POSTED BY: Nagata Hannya
Posted 10 years ago

You can save the entire graphic, including the label, by selecting the cell (click on the cell bar at the very right), then right-clicking to get a menu, and then using Save Graphic As. This works even without rasterizing. You can also Export the graphic and get the same result. I don't know of a method to select the entire graphic with the mouse.

POSTED BY: David Keith
Attachments:
POSTED BY: Nagata Hannya
Attachments:
POSTED BY: Patrik Ekenberg
Attachments:
POSTED BY: Nagata Hannya
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard