Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4153
| From | Yves Klett <yves.klett@googlemail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: LabelPlot: Changing size of CurveLabel |
| Date | 2011-08-03 11:12 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j1baf5$amb$1@smc.vnet.net> (permalink) |
| References | <j18mbp$soh$1@smc.vnet.net> |
Hi,
seems slightly dated. The style options are hardcoded in the Module. A
quick´n dirty modification could be (pulling all the formatting into the
function call and replacing StyleForm with Style):
LabelPlot[func_List, {var_, varmin_, varmax_}, opts___?OptionQ] :=
Module[{crvlbl, pltopts, funclis, txt, tt, aa, f},
crvlbl = CurveLabel /. {opts} /. CurveLabel -> None;
pltopts = Select[{opts}, #[[1]] =!= CurveLabel &];
funclis =
Table[f[i][tt_] =
If[Head[func[[i]]] === Symbol && func[[i]] =!= var,
func[[i]][tt], func[[i]] /. var -> tt], {i, Length[func]}];
txt = Table[
If[Head[crvlbl[[i]]] === List,
Text[crvlbl[[i, 1]], {aa[i] = crvlbl[[i, 2]] (varmax - varmin),
f[i][aa[i]]}, {0, -1}],
Text[crvlbl[[i]], {aa[i] = (varmax - varmin)/2,
f[i][aa[i]]}, {0, -1}]], {i, Length[crvlbl]}];
Plot[Evaluate[Table[f[i][rr], {i, Length[func]}]], {rr, varmin,
varmax}, Epilog -> txt, Evaluate[pltopts]]];
myplt3 = LabelPlot[{Sin[x], Cos[2 x]/3}, {x, 0, 2 \[Pi]},
PlotStyle -> {Hue[.95], Hue[.7]},
CurveLabel -> {{Style[ToString[adf], FontFamily -> "Arial",
Background -> LightBlue, 25], 3/4}, f2[t]}]
You might want to set up a some default options for the Style calls. The
old module also calls ToString by default, which could affect advanced
expressions (fancy typesetting, grids etc.) somewhat bad.
Regards,
Yves
Am 02.08.2011 13:17, schrieb paulvonhippel at yahoo:
> Have you used the user-defined LabelPlot function? It's pretty cool:
> http://library.wolfram.com/infocenter/TechNotes/4116/
> But how do I change the size of the font used to display the labels in
> the CurveLabel option?
>
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
LabelPlot: Changing size of CurveLabel paulvonhippel at yahoo <paulvonhippel@yahoo.com> - 2011-08-02 11:17 +0000 Re: LabelPlot: Changing size of CurveLabel Yves Klett <yves.klett@googlemail.com> - 2011-08-03 11:12 +0000
csiph-web