# Tag Info

8

The expression that is plotted in the legend are the provided pure functions (with some scoped internal variable names). PlotLegends is somewhat confused so we have to provide explicit entries for the Legend. Since the desired result is somewhat unclear here a few suggestions: v[x_, k_] := k*x^-k; g[x_, k_] := (x^-k)*Sin[x^k]/(1 + x^k); f[x_, k_] := x^k/(1 ...

3

One approach could be to set the scaling of the colors yourself: (I slightly cleaned up the code a bit, so that we do not get confused by double-setting the options) Module[{R1, R2, x, \[CapitalDelta], eqs}, R1 = 15; R2 = 5; eqs = {-((R1 + R2 + R1 x - R2 x - R2 \[CapitalDelta] - R1 x \[CapitalDelta] + R2 x \[CapitalDelta])/(-2 + ...

8

The package PlotLegends is obsolete in v9, and so is the package GraphicsLegend that the Mie code notebook was using. Since you are running v9, you might as well use the new stuff which is integrated much better. Of course, as there are several plots to combine, the method is going to look similar, but not as convoluted as the old form. The high level ...

3

Of course, this got a lot easier in version 9: BarChart[RandomVariate[NormalDistribution[0, 0.6], 40], ChartStyle -> Join[ConstantArray[Green, {39}], {Orange}], ChartLegends -> Placed[SwatchLegend[{Orange}, {"Estimate"}], Bottom]]

5

You could add in a label function: label[k_, x_] := Graphics@Text["k = " <> ToString[k], {uh[x, a, go, s, m, k], x}, {0, -1}]; Then show it all together: Show[Table[{plt[k], label[k, 1]}, {k, 1.0, 3.5, 0.5}]]

0

You could use Style[StringForm["s = ", i], Bold, Italic, 16] to combine number and string (and quite a bit of PlotLegends parameter fumbling): << PlotLegends Plot[Evaluate[(g (-1 + q)^2 (a + b + g (1 - q) s)^2)/((a + b + g - g p q)^3) /. {q -> 4/5, p -> 1/4, a -> 0.1, g -> 500, s -> Range[0.1, 3, 0.4]} ], {b, ...

0

In your legend, you can replace the line Row[{Style["s = ",Bold,Italic,FontSize-> 16],i}] by this: Row[{"s = ", i}, BaseStyle -> {Bold, Italic, FontSize -> 16}] Here, I just used an option for Row to specify the style, because both elements of Row are intended to have the same style. Your statement had Style wrapping only the first element of ...

1

Here's a guess at what you're after: SeedRandom[1]; data = Accumulate[RandomReal[{-0.2, 0.2}, 300]]; thirds = Partition[data, 100]; interps = Interpolation /@ thirds; myplot = ListLogLinearPlot[thirds]; DynamicModule[{pos = MapThread[{Log@#, #2[#]} &, {{5, 16, 50}, interps}]}, LocatorPane[ Dynamic[pos, (pos = MapThread[ Function[{pt, ...

8

You also aren't getting the right line thickness in your legend. I'd suggest a slightly different route, of creating custom legend markers, similar to the method described in this answer, and including them in a SwatchLegend. legmarkers = MapThread[Graphics[{#1, AbsoluteThickness[2], Line[{{-1, 0}, {1, 0}}], #2}] &, {col, {Disk[{0, 0}, 0.3], ...

2

The question refers to a function rasterListContourPlot whose purpose was to replace the polygon-based filling of ListContourPlot with a rasterized image while maintaining all line-bases primitives as vector art. The output is a combination of Graphics objects, and there was no provision for Legended wrappers. Here is a quick fix to the particular function ...

5

I'm sure you can move from here and make the legend you desire. (*Make your plot*) plot = ListContourPlot[ Table[Cos[Sqrt[bx^2 + by^2]], {bx, -1, 1, 0.1}, {by, -1, 1, 0.1}], ContourLabels -> All, ColorFunction -> "LakeColors"]; (*Specify your legend labels*) labels = Range[0.1, 1, 0.1]; (*Make legend*) legend = ...

Top 50 recent answers are included