Tag Info

New answers tagged

2

A workaround is to use GeometricTransformation instead of Rotate. By specifying coordinates in the Offset form we can achieve consistent size of markers on the plot and in the legend. The cropping of the markers in the legend can be avoided by increasing their sizes as MinHsuan Peng suggests: ListLinePlot[{Prime~Array~12, Fibonacci~Array~12}, PlotMarkers ...


1

A workaround to question 2 is to increase legend marker size: LineLegend[Automatic, LegendMarkerSize -> {40, 20}]


0

You can see what ColorFunction was used for the graphics as follows. data = RandomReal[1, {4, 4}]; MatrixPlot[data, PlotTheme -> "Scientific", PlotLegends -> Placed[BarLegend[Automatic, LegendLayout -> "Column", LabelStyle -> {FontSize -> 20}], After]] // InputForm (*Legended[Graphics[Raster[{{{0.4461453382422279, 0.491477006229007, ...


1

This is straightforward. All of the legend functions accept the generic, top level arguments, e.g. LineLegend[Automatic] which allows you to modify the behavior. So, you would use BarLegend[Automatic, LabelStyle -> {FontSize -> 20}].


4

EDIT As Mr Wizard observed my original code is not self contained. For reasons that I fail to understand this seemed to work with what seemed a fresh session. The code works if you move the gauge marker but to post correct code (I leave the animated gif as it is the same outcome): DynamicModule[{s = 0}, Framed[Row[{VerticalGauge[Dynamic[s], {0, 1}, ...


1

The problem is with your ImageSize->Full option. Try leaving it out or specify your ImageSize to a certain size (e.g. 500) instead of Full. otherOptions = {MaxPlotPoints -> 1000, ColorFunction -> "ThermometerColors", PlotLabel -> Style["Array Plot of Raw Data", 11, Bold, Black], PlotRangePadding -> 0., ImageSize -> Full, ...


11

Two work-arounds: (1) Use TickLabels BarLegend[{"Rainbow", {-0.015, 0.015}}, ImageSize->300, Charting`TickLabels -> (Style[NumberForm[#, {Infinity, 3}],Bold,Black,12] & /@ Range[-.015, .015, .005])] (2) Use LabelingFunction: BarLegend[{"Rainbow", {-0.015, 0.015}}, ImageSize->300, LabelingFunction -> (Style[NumberForm[#, ...


1

For illustrative purpose (please also search site and documentation): toy = Table[{j, j^2 + RandomReal[{-3, 3}]}, {j, -4, 4, 0.1}]; mod = LinearModelFit[toy, {1, x, x^2}, x]; lp = ListPlot[toy, PlotStyle -> Red]; modp = Plot[mod[x], {x, -4, 4}, PlotStyle -> Blue]; lgnd = Framed[ Column[{PointLegend[{Red}, {"data"}], LineLegend[{Blue}, ...


8

After a rather long debugging session in our chat we could determine the reason of the problem and come up with a workaround. In short, we first tried whether the issue appears for the most basic Graphics[], which it didn't. As it turned out the gray background is introduced by using PlotLegends as in the example above. We went further by comparing ...


4

This bug was fixed in version 10. Plot[{Sin[x], Cos[x]}, {x, 0, 5}, BaseStyle -> AbsoluteDashing[{5, 6}], PlotStyle -> {Orange, Brown}, PlotLegends -> LineLegend["Expressions"]] However, AbsoluteThickness does not seem to propagate as a BaseStyle. This might have something to do with the new plot themes. Plot[{Sin[x], Cos[x]}, {x, 0, 5}, ...


3

This works automatically in Mathematica 10. Using your original input: line = {{0, 2.15}, {0.05, 2.03}, {0.1, 1.94}, {0.2, 1.8}, {0.3, 1.68}, {0.4, 1.58}}; points = {{0.1009`, 1.206`}, {0.19455`, 1.4569`}, {0.3597`, 1.2315`}}; ListPlot[{line, points}, PlotRange -> {0, 2.5}, PlotLegends -> {"line", "points"}, PlotMarkers -> {" ", ...


3

ListLinePlot[Table[Accumulate[RandomReal[{-1, 1}, 250]], {10}], PlotStyle -> (Hue[#] & /@ Range[0., .9, .1]), ImageSize -> 500, PlotLegends -> BarLegend[{Hue, {0, 10}}, 10, ColorFunctionScaling -> True]]


3

Plot[{x, x^2, x^3}, {x, 0, 3}, Frame -> True, PlotLegends -> Placed[LineLegend[ColorData[1] /@ Range[3], {"long text 1", "long text 2", "long text 3"}, LegendLayout -> "Column"], Above]]


3

Plot[{x, x^2, x^3}, {x, 0, 3}, Frame -> True, PlotLegends -> Placed[SwatchLegend[{"long text 1", "long text 2", "long text 3"}, LegendMarkers -> "Line", LegendLayout -> "Column"], {{0.5, 1.3}, {0.5, 1}}]]



Top 50 recent answers are included