Modifying plot attributes in a function
- To: mathgroup at yoda.physics.unc.edu
- Subject: Modifying plot attributes in a function
- From: mek at guinan.psu.edu (Mark E. Kotanchek)
- Date: Tue, 23 Mar 93 11:37:34 -0500
Hi,
I've defined a function which puts labels and such on a plot so I can
avoid lots of keystrokes. Now I have the problem that I want to
change some plot attributes inside the function. Thus, for example,
if I define the function,
MyPlot[a_,b_,c_] := Plot[a+b x + c x^2,{x,-1,1}, Frame->True,
RotateLabel->True, FrameLabel->{"x","curve"}, PlotLabel->"MyPlot
Function"]
I can get a curve via MyPlot[1,1,1]. My question is how I can modify
the plot so, e.g., I have dashed lines rather than the default solid.
I haven't been able to decipher the correct approach from my
references and have tried the various permutations of //, /. etc.
What I'd like to do is to plot multiple curves via Show and being
able to set DisplayFunction -> Identity during the generation and
resetting it for the print.
I know this is simple; but, being simple-minded, I'd appreciate your
help.
Thanks much,
Mark.
---
Mark Kotanchek
Guidance & Control Dept - 363 ASB
Applied Research Lab/Penn State
P.O. Box 30
State College, PA 16804
e-mail: mek at guinan.psu.edu (NeXTmail)
TEL: (814)863-0682
FAX: (814)863-7843