Hot answers tagged

28

i = Import@"http://i.stack.imgur.com/8I3B1.jpg"; f[{{tmin_, tmax_}, {rmin_, rmax_}}, ___] := Module[{l = Join[{{0, 0}}, Table[{Cos@t, Sin@t}, {t, tmin, tmax, (tmax-tmin)/100}]]}, {Texture[i], EdgeForm[], Polygon[l, VertexTextureCoordinates -> 1/2 Transpose[Transpose[l] + {1, 1}]]}] Framed@PieChart[{1, 2, 3, 4, 5, 6}, ChartElementFunction -> f] ...


26

None of the solutions so far makes use of the fact that the data are percentages and hence add op to (nearly) 100. (* Add the rows of the data list *) Total[Rest /@ data, {2}] (* out *) {99.96, 99.98, 99.98, 99.99, 99.99, 99.99, 99.99, 99.97, 100., 99.99,100., 100.} Borrowing from Pinguin Dirk: BarChart[Rest /@ data ,ChartLayout -> "Stacked" ,...


25

One More way! The means of each data is the blue dot. bars are color coded according to the standard deviation within each sub list. ListLinePlot[Mean /@ data, Prolog -> MapThread[{Thickness[.04], ColorData["SandyTerrain"][#3], Line[{{#2, First@#1}, {#2, Last@#1}}], Opacity[0.7], White, Dashed, Thickness[0.003], Arrowheads[0.025], ...


22

vertices = {"rush hour", "bad weather", "accident", "traffic jam", "sirens"}; edges = DirectedEdge @@@ {"rush hour" -> "traffic jam", "bad weather" -> "accident", "accident" -> "traffic jam", "bad weather" -> "traffic jam", "accident" -> "sirens"}; edgelabels = RandomWord["Noun", Length @ edges]; Graph[edges, PlotTheme -> ...


20

Out of curiosity I tried this: DistributionChart[Rest /@ data, ChartLabels -> {data[[All, 1]]}, ChartElementFunction -> "HistogramDensity", ChartStyle -> {LightRed, LightGreen, LightBlue}, BarOrigin -> Left] As for 'interpretation', here's my attempt. This type of chart tries to show the distribution of the values in each 'row'. The ...


17

Since nobody has used this function yet, I will place it here. Your data seems to be organised almost perfectly for ArrayPlot. First I removed the first column from the rest of the values and added to the axes ticks. The rest is just displayed via ArrayPlot, with a particular color scale. {xs, values} = {First[#], Transpose@Rest[#]} &@Thread@data; ...


16

r = 1; (*radius of each disk*) (*center of each disk. Numbers left to right, top to bottom*) c1 = {0, 0}; c2 = {r + 2, 0}; c3 = {r + 5, 0}; c4 = {r + 2, -(r + 2)}; c5 = {r + 5, -(r + 2)}; makeDisk[r_, c_] := {EdgeForm[Black],LightYellow, Disk[c, r]}(*change as needed*) makeArrow[from_, to_, dir_] := Module[{z = Cos[Pi/4]}, Which[ dir == "right", ...


15

With the data beeing data = RandomVariate[NormalDistribution[0, 1], 200]; the range of the box specified to be one sigma (approx. 68.3 %tile range) by sigma=Erf[1/Sqrt[2]] and a limit for the fences defined to be 10 % fencesLimit = 0.1 we can plot a BoxWhiskerChart using: BoxWhiskerChart[data, "Median", Method -> "BoxRange" -> (...


15

Combinining @belisarius's cool solution for the key challenge with some built-in ChartElementDataFunctions you can do a number of tricks: onecent=Import["http://i.stack.imgur.com/8I3B1.jpg"]; ClearAll[cEDF]; cEDF[datafunc_: ChartElementDataFunction["NoiseSector", "AngularFrequency" -> 13, "RadialAmplitude" -> 0.1]][texture_: ExampleData[{"...


14

As discussed in the comment, it seems you want: BarChart[Rest /@ data, ChartLabels -> {data[[All, 1]], None}, BarSpacing -> {0, 2}] see other options in BarChart to format as you desire (as I do not know what it is for, it's hard to suggest other things), bonne chance! or a version with labels for the bars, placed above the bars (see ...


12

Final Update: Adding Callouts to special points ClearAll[leaderSizeF, calloutF, densityCalloutWhiskerF] leaderSizeF[bx_] := Switch[Sign[(# - Mean /@ bx)], {1, 1} | {0, 0} |{1, 0} | {0, 1}, {{40, 45 Degree, 0}, {40, 0 Degree}}, {1, -1} | {0, -1}, {{40, 315 Degree, 0}, {40, 0 Degree}}, {-1, 1} | {-1, 0}, {{40, 135 Degree, 0}, {40, 180 Degree}}, {-1,...


11

You can already achieve this using Histogram. No need to fuss with ListPlot. Use these forms for the second and third arguments of Histogram, and ignore the first argument: The following bin width specifications $bspec$ can be given: $\{\{b_1,b_2,\dots\}\}\qquad$ use the bins $[b_1,b_2),[b_2,b_3),\dots$ $\mathit{fb}\qquad\qquad\qquad\,\,$ ...


11

diversityCoearse = Association[ "Firmicutes" -> 1000, "Bacteroidetes" -> 200, "Verrucomicrobia" -> 20, "Proteobacteria" -> 40, "Actinobacteria" -> 32] BarChart[diversityCoearse, ImageSize -> Large, AspectRatio -> 1/6, BarOrigin -> Left, ChartLayout -> "Stacked", ChartLabels -> Placed[Keys @ diversityCoearse, {...


11

SeedRandom[1] dates = Sort /@ RandomInteger[{10, 1000}, {5, 2}]; data = MapIndexed[Thread@{#, #2[[1]]} &, dates]; labels = CharacterRange["A", "E"]; data2 = MapIndexed[Labeled[{#, #2[[1]]}, Style[labels[[#2[[1]]]], White, FontSize -> Scaled[.03]], Center] &, GeometricMean /@ dates]; ListLogLinearPlot Show[ListLogLinearPlot[data, BaseStyle -...


10

The built-in Joined option to BarChart doesn't really do what you want. So what I'd suggest is overlaying a BarChart on a ListLinePlot that creates the lines. Here is a simplified two-stacks-of-bars version. data = {{4, 3, 0, 0, 4.5}, {0, 3, 5, 6, 0}}; The first point is that you will need to have zero-value elements in the bar chart data to ensure you get ...


10

Here is a slightly improved/updated version of the solution developed by Peter Frentrup and published at Jan 15, 2010 on the xkcd forum. The changes I have made are to put "Image" as the second argument for Rasterize, explicitly convert the result to grayscale and use ImageData for extracting channel values (all these features were not present in Mathematica ...


10

BarChart[numbers, BaseStyle -> Directive[FontFamily -> font, FontSize -> 13], ChartStyle -> 10, ImageSize -> 560, BarOrigin -> Left, ChartLabels -> Placed[languages, After], LabelingFunction -> (Placed[ Style[#, If[Plus @@ ColorData[10, Last[#2]] < 1.5, White, Black]], Center] &), AxesLabel -> {"", "millions\nof ...


10

RectangleChart[Callout[{#2, 1}, #]] & @@@ diversityCoearse, ChartStyle -> 97, AspectRatio -> 1/2, BarSpacing->{0,0}, Axes -> {True, False}] Update: using Normalized data: diversityC = diversityCoearse; diversityC[[All,2]]=Normalize[diversityC[[All,2]], Total]; RectangleChart[Callout[{#2, 1}, #] & @@@ diversityC, ChartStyle -> ...


10

You could use Graphics and built it up yourself. One way to start may be: Options[versionChart] = { LabelStyle -> Directive[White, Medium], GridLinesStyle -> Directive[Thick, Gray], ImageSize -> Large, ColorFunction -> ColorData[92], "CoreSize" -> 20 }; versionChart[data_,OptionsPattern[]] := With[{ layers = Union@Flatten[Last/@...


10

How about this? yData = {10, 7, 4, 2, -5, -2, 3}; BarChart[yData, ChartLayout -> "Stepped"]


9

Something like this? BarChart[{{1, 2, 3}, {1, 3, 2}, {5, 2}}, ChartLabels -> {"a", "b", "c"}, BaseStyle -> Directive[FontFamily -> "Zapfino", FontSize -> 16]] At first glance, the online documentation for BarChart doesn't describe any useful font options, but when you see the phrase "BarChart has the same options as Graphics with the ...


9

The data in the question presents a good case for visualization with Chernoff faces. For that data, actually, the Chernoff faces work "out of the box" pretty well! Make faces Load Chernoff faces plotting package: Import["https://raw.githubusercontent.com/antononcube/\ MathematicaForPrediction/master/ChernoffFaces.m"] As it is explained in the question ...


9

Histogram does not support a grouped ChartLayout. Hence the workaround using BarChart: I've arranged the 'histogram' into a bar chart so that the data can be displayed side by side. An alternative to using BarChart with "Grouped" layout is to use a custom ChartElementFunction to produce the desired Histogram layout: ClearAll[groupedHistogram] ...


9

The dynamic variables controlling the popout state of each segment are initialised to False in the DynamicModule container. If you alter the initialisation for a segment to True it will start in the popped out state. This is a crude way to do that: explode[pc_, i_] := ReplacePart[pc, Position[pc, False][[i]] -> True] PieChart[{1, 2, 3}] ~explode~ 2


9

ticks = Join[Thread[{Range[π/2, 2 π, π/2], Reverse@Range[3, 12, 3], {0, .05}}, List, 2], Thread[{Complement[Range[π/6, 2 π- π/6, π/6], Range[π/2, 2 π, π/2]], "", {0, .02}}, List, 1]]; pc2 = First @ PieChart[{1, 1}, SectorOrigin -> {{0, 1}, 2}, ChartStyle -> Directive[EdgeForm[], FaceForm[None]], SectorSpacing -> {0, 0}, ...


9

You can wrap input data with Button with action CopyToClipboard: data = {1, 2, 3}; BarChart[Button[Tooltip[#, "I want tip"], CopyToClipboard@#] & /@ data, ChartElementFunction -> "GlassRectangle", ChartStyle -> "Pastel"] Update: You can add tool tips in several ways: tooltips = {"tooltip1", "tooltip2", "tooltip3"}; Use Tooltip as a wrapper ...


8

A solution for PieChart aficionados: GraphicsGrid[Partition[ Table[PieChart[(Rest /@ data)[[i]], ChartLabels -> Placed[Range[8], "RadialOutside"], PlotLabel -> data[[i, 1]]], {i, Length[data[[All, 1]]]}], 4], ImageSize -> 400] Or, if you are interested in the temporal evolution of each process: GraphicsGrid[Partition[ Table[...


8

A custom BarChart that takes as input a dataset accepted by BarChart and the index of the element in each group that fans out to the next group: ClearAll[ceF, funnelBarChart] ceF[cedf_: "GlassRectangle", o : OptionsPattern[]] := Module[{color = Charting`ChartStyleInformation["Color"], spacing = If[#3 === {}, 0, #3[[1, 2]]], next = If[#3 === {}, 0, If[...


8

While not a Bar Chart per se, I usually prefer to use the result from HistrogramList directly with ListPlot and then join the points with InterpolationOrder->0. SeedRandom[1465]; data = RandomVariate[NormalDistribution[0, 1], 1000]; mapoints=Thread[{#[[1]], Append[#[[2]], 0.0]}] &@HistogramList[data]; ListPlot[mapoints, Joined -> True, ...


8

Here is a version that builds up the "full Tufte" version of the plot presented above by building up the corresponding Graphics primitives. Quite a few styling decisions must be made with respect to colors, spacings, overall aspect ratio of the plot, etc. I went with choices that were aesthetically pleasing to me, but of course it should be relatively easy ...


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