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 क्लाइंट से उपयोग करें