Options for Plot
- To: mathgroup at smc.vnet.net
- Subject: [mg14973] Options for Plot
- From: Arnold Seiken <seikena at idol.union.edu>
- Date: Wed, 2 Dec 1998 03:58:57 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Dear Mathematica Mavens,
Three questions about the Plot function and its options.
1. The following gives no problem:
Plot[Sin[x]^2, {x,0,2Pi},
PlotLabel->FontForm[Sin[x]^2, {"Times", 14}] ]
Change the value of the FormatType option and strange things appear
along the y-axis. (I'm using Mac OS 8.1, Mathematica 3.0.) Why?
Plot[Sin[x]^2, {x,0,2Pi},
PlotLabel->FontForm[Sin[x]^2, {"Times", 14}],
FormatType->TraditionalForm
]
Also, no problem if we use PlotStyle.
Plot[Sin[x]^2, {x,0,2Pi},
PlotStyle->Text[Sin[x]^2"y=" ,{3,0.5}] ]
Again, TraditionalForm seems to affect text on the y-axis.
Plot[Sin[x]^2, {x,0,2Pi},
PlotStyle->Text[Sin[x]^2"y=" ,{3,0.5}],
FormatType->TraditionalForm
]
2. The second question concerns the first argument of the above Text
function, namely Sin[x]^2"y". This gives the desired output but the
syntax looks strange and I have no idea why it works. The same syntax
works when used as a first argument for FontForm.
3. TextStyle seems to control not only the size, color,etc of text
placed in the middle of a plot but also the size, color,etc of the axes
labels and the number symbols placed along the axes.
Plot[Sin[x]^2, {x,0,2Pi},
PlotLabel->StyleForm[Sin[x]^2,
FontSlant->"Plain",
FontColor->RGBColor[0,0,1],
FontSize->16,
FontFamily->"Times"
],
AxesLabel->{"x", "y"},
PlotStyle->{Text[Sin[x]^2 ,{3,0.5}],RGBColor[0,1,0]},
TextStyle->{FontSlant->"Italic",
FontSize->12,
FontWeight->"Bold",
FontFamily->"Machias",
FontColor->RGBColor[1,0,0]},
FormatType->TraditionalForm
]
Can the above be modified to obtain say, yellow axes labels and magenta
number symbols along the axes?