Formats for Text in Graphics
|BaseStyle->value||an option for the text style in a graphic|
|FormatType->value||an option for the text format type in a graphic|
Specifying formats for text in graphics.
Here is a plot with default settings for all formats.
Here is the same plot, but now using a 12-point bold font.
This tells Mathematica
what default text style to use for all subsequent plots.
Now all the text is in 14-point Times font.
|"style"||a named style in your current stylesheet|
|FontSize->n||the size of font to use in printer's points|
|FontSlant->"Italic"||use an italic font|
|FontWeight->"Bold"||use a bold font|
|FontFamily->"name"||specify the name of the font family to use (e.g. , , )|
Typical elements used in the setting for BaseStyle.
If you use the standard notebook front end for Mathematica
, then you can set BaseStyle
to be the name of a style defined in your current notebook's stylesheet. You can also explicitly specify how text should be formatted by using options such as FontSize
. Note that FontSize
gives the absolute size of the font to use, measured in units of printer's points, with one point being
inches. If you resize a plot whose font size is specified as a number, the text in it will not by default change size: to get text of a different size you must explicitly specify a new value for the FontSize
option. If you resize a plot whose font size is specified as a scaled quantity, the font will scale as the plot is resized. With FontSize->Scaled[s]
, the effective font size will be s
scaled units in the plot.
Now all the text resizes as the plot is resized.
|Style[expr,"style"]||output expr in the specified style|
|Style[expr,options]||output expr using the specified font and style options|
|StandardForm[expr]||output expr in StandardForm|
Changing the formats of individual pieces of output.
This outputs the plot label using the section heading style in your current notebook.
This uses the section heading style, but modified to be in italics.
You should realize that the ability to refer to styles such as
depends on using the standard Mathematica
notebook front end. Even if you are just using a text-based interface to Mathematica
, however, you can still specify formatting of text in graphics using options such as FontSize
. The complete collection of options that you can use is given in "Text and Font Options"