Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Histogram[RandomVariate[NormalDistribution[10, 2], 500]]
- Histogram[RandomVariate[NormalDistribution[10, 2], 500],
- ColorFunction -> (Which[# < 40, Yellow, 40 <= # < 90, Red, True, Blue] &),
- ColorFunctionScaling -> False]
- cedF[{{xmin_, xmax_}, {ymin_, ymax_}}, ___] :={If[xmax <= 8,
- RGBColor[1, 0, 0], Sequence[]],
- Dynamic@EdgeForm[Directive[Thickness[.015], Lighter@CurrentValue["Color"]]],
- Rectangle[{xmin, ymin}, {xmax, ymax}, RoundingRadius -> 5]};
- Histogram[RandomVariate[NormalDistribution[10, 2], 500],ChartStyle -> "Pastel",
- ChartElementFunction -> cedF]
- cedf2[from_,to_,color_: Red, t_:Small, rr_: 0][{{xmin_, xmax_}, {ymin_, ymax_}}, ___] :=
- {If[from < xmax <= to, color, Sequence[]],
- Dynamic@EdgeForm[Directive[Thickness[t], Lighter@CurrentValue["Color"]]],
- Rectangle[{xmin, ymin}, {xmax, ymax}, RoundingRadius -> rr]}
- Histogram[RandomVariate[NormalDistribution[10, 2], 500], ChartStyle -> "Pastel",
- ChartElementFunction -> cedf2[6, 10, Purple, Small, 3]]
- sgmntsclF = ChartElementDataFunction["SegmentScaleRectangle",
- "Segments" -> 8, "ColorScheme" -> "TemperatureMap"];
- grdntrctF = ChartElementDataFunction["GradientRectangle",
- "ColorScheme" -> "Rainbow", "GradientOrigin" -> Top];
- Histogram[RandomVariate[NormalDistribution[10, 2], 500], ChartStyle -> "Pastel",
- ChartElementFunction -> ((If[7 < #[[1, 2]] <= 10, sgmntsclF[##], grdntrctF[##]]) &)]
- hist = Histogram[RandomReal[NormalDistribution[10, 2], 500]]
- Cases[hist, RectangleBox[{a_, _}, {b_, x_}] :> {b, x}, -1];
- If[# <= 8, Style[#2, Red], #2] & @@@ %;
- BarChart @ %
- dat = HistogramList[RandomVariate[NormalDistribution[10, 2], 500]];
- If[# <= 8, Style[#2, Red], #2] & @@@ Transpose @ dat;
- BarChart @ %
Add Comment
Please, Sign In to add comment