Tag Info

Hot answers tagged

9

This was more involved than I expected. First, you need to set the ColorFunction to encompass the full range, ColorData[{"BlueGreenYellow", {0, 10}}] Interestingly, I did not know about that form of ColorData until earlier this week, so I recommend reading through the Details section closely. Now, to use this within ContourPlot, you need to set ...


6

In 10.x, the simplest thing is to specify the PlotMarkers directly, but as noted, the legends ignore ImageSize if specified within the graphic. The correct way to do this is to use the {{g1, s1}, {g2, s2} ...} form of PlotMarkers, e.g. ListPlot[Table[Accumulate@RandomReal[1, 10] + i, {i, 2}], PlotMarkers -> {{Graphics[{Disk[]}], 1/4}, ...


6

This is an addendum to rcollyer's answer. I'll delete this should he choose to incorporate the gist of this answer into his. I think there are better choices to be made for the PlotLegends and ColorFunction options. Consider the following: ContourPlot[x y, {x, 0, 2}, {y, 0, 2}, PlotLegends -> BarLegend[{Automatic, {0, 4}}, {Automatic, 8}], ...


4

I propose using the lower-level System`PlotThemeDump`resolvePlotTheme to find the information you need. This reveals the color scheme number itself rather than resolving to a list of Directives. You must give the plot function name as a String. The key you are looking for is "DefaultColor: Themes`ThemeRules; (* preload PlotThemes subsystem *) ...


4

For version 10.x the answer can be found in the documentation: ListPlot[Table[Accumulate@RandomReal[1, 10] + i, {i, 2}], PlotMarkers -> {{"\[FilledCircle]", 20}, {"\[FilledSquare]", 10}}, Joined -> True, PlotLegends -> {"line1", "line2"}] This should work for graphics objects like the OP used too.


4

"Expressions" for legend in ListPlot family is used because of Association. With Association input, the plot will automatically pick up the keys as legends. Here is an example: ListPlot[<|"A"->{1,2,3},"B"->{2,3,4}|>] SetOptions is to set the default values to options but it doesn't guarantee that the settings will be used by the plot since ...


3

The problem appears to be with specifying Automatic for the colors with PointLegend rather than letting it default. $Version "10.2.0 for Mac OS X x86 (64-bit) (July 7, 2015)" pValues = {0.3, 0.5, 0.8}; dat = Table[{k, PDF[BinomialDistribution[50, p], k]}, {p, pValues}, {k, 0, 50}]; ListPlot[dat, Filling -> Axis, PlotLegends -> ...



Only top voted, non community-wiki answers of a minimum length are eligible