Qurak

Place legends inside a plot

ఉదాహరణ 2 దశలు, ఒకే సెషన్‌లో క్రమంగా నడుస్తాయి. ప్రతి దశా ఇంజిన్‌పై అమలు చేయబడింది, కింది అవుట్‌పుట్ అది ఇచ్చినదే.

దశ 1
styleoptions = Sequence@@{BaseStyle -> Gray, Filling -> Axis, Frame -> True, FillingStyle -> Array[# -> Opacity[0.3, {Hue[0.58, 1, 1], Hue[0.12, 1, 1], Hue[0, 1, 1], Hue[0.5, 1, .7], Hue[0.67, .5, 1], Hue[0.17, 1, .8], Hue[0.9, 1, .8], Hue[0.11, .7, .9], Hue[0.61, 1, 1], Hue[0.08, 1, 1]}[[#]]]&, 10], LabelStyle -> {FontFamily -> "Helvetica", 14, Gray}, PlotStyle -> (Directive[AbsoluteThickness[4], #]& /@ {Hue[0.58, 1, 1], Hue[0.12, 1, 1], Hue[0, 1, 1], Hue[0.5, 1, .7], Hue[0.67, .5, 1], Hue[0.17, 1, .8], Hue[0.9, 1, .8], Hue[0.11, .7, .9], Hue[0.61, 1, 1], Hue[0.08, 1, 1]})};

అవుట్‌పుట్ లేదు - ఈ దశ తదుపరి దానికి ఏదో సిద్ధం చేస్తుంది.

దశ 2
Plot[Evaluate[Table[BesselJ[n, x], {n, 1, 5, 1}]], {x, -3, 3}, ImageSize -> 400, PlotLegends -> Placed[LineLegend[Range[1, 5], LabelStyle -> {Gray, Bold, 18}, LegendLabel -> BesselJ[n, x], LegendLayout -> {"Row", 2}], {0.75, 0.25}], Evaluate@styleoptions]
అవుట్‌పుట్
-Graphics-

వాడిన ఫంక్షన్లు

సంబంధిత రెసిపీలు

అన్ని రెసిపీలు · ఫంక్షన్ రిఫరెన్స్ · దీన్ని MCP క్లయింట్ నుండి వాడండి