
|
Search
Search Loci: |
LociConstructing Mathlets Quickly using LiveGraphics3DLabeling Axes and PlotsApart from Labels for axes are specified by the option
(* all but the last three commands are the same as in the previous example *)
axeslabel = {StyleForm["x", FontFamily -> "Times", FontSize -> 20],
StyleForm["y", FontFamily -> "Times", FontSize -> 20],
StyleForm["z", FontFamily -> "Times", FontSize -> 20]};
example = Graphics3D[
{mesh, point, xSection, ySection, tanplane},
Boxed -> True, Lighting -> False, Axes -> True, AxesLabel -> axeslabel]
WriteLiveForm["meshPlaneText5.lg3d", example]
Resulting applet: In this example, we have also set To label the whole plot, you can use the option
(* all but the last three commands are the same as in the previous example *)
plotlabel = StyleForm[
StringForm["Plot of 2*y*Exp[-x^2-y^2]; Current z value = `1`", z],
FontFamily -> "Times", FontSize -> 20];
example = Graphics3D[
{mesh, point, xSection, ySection, tanplane},
Boxed -> False, Lighting -> False, PlotLabel -> plotlabel]
WriteLiveForm["meshPlaneText6.lg3d", example]
Resulting applet: As you rotate the plot, the plot label will keep its position. Note also that the function value included in the label is updated as you drag the red point. However, there is no need to use this syntax for mathematical expressions in labels. We can produce a more traditional mathematical notation with the help of formatting functions such as (* all but the last three commands are the same as in the previous example *)
plotlabel=StyleForm[StringForm["Plot of 2 `1` `2`; Current `3` value = `4`",
StyleForm["y", FontSlant -> "Italic"],
Superscript["e", StringForm["-`1`-`2`",
Superscript[StyleForm["x", FontSlant->"Italic"], "2"],
Superscript[StyleForm["y", FontSlant->"Italic"], "2"]]],
StyleForm["z", FontSlant -> "Italic"], zDisplay],
FontFamily->"Times", FontSize->20]; example = Graphics3D[
{mesh, point, xSection, ySection, tanplane},
Boxed -> False, Lighting -> False, PlotLabel -> plotlabel]
WriteLiveForm["meshPlaneText7.lg3d", example]
Note the reference to Resulting applet: There is still much more to say about text labels in LiveGraphics3D; however, by now you should have got a fairly good idea of how to do basic text formatting with the help of LiveGraphics3D. |