Tag Info

Hot answers tagged

6

Module[{data, range}, data = TimeSeries[#, ResamplingMethod -> {"Constant", 0}] &@{{1891, 1}, {1892, 1}, {1897, 1}, {1898, 1}, {1903, 1}, {1904, 1}, {1905, 1}, {1908, 4}, {1909, 6}, {1910, 6}, {1911, 16}, {1912, 33}, {1913, 35}, {1914, 43}, {1915, 39}, {1916, 31}, {1917, 42}, {1918, 52}, {1919, 44}, {1920, 53}, {1921, 33}, ...


6

Depending on exactly what you're trying to do, adding Frame->{False,True,False,False},Axes->{True,False},PlotRangePadding->None to keep your x axis and use only the frame on the y-axis should work. BarChart[{{0.123, 0.492}, {2.865, 0.055}, {1.03, 1.084}, {4.282, 0.053}} , AxesLabel -> {None, Rotate["Value", 90 Degree]} , ChartLabels -> ...


5

A small change to the LabelingFunction seems to do the trick: BarChart[{{0.123, 0.492}, {2.865, 0.055}, {1.03, 1.084}, {4.282, 0.053}}, AxesLabel -> {"", "Value"}, ChartLabels -> {Placed[{"data1", "data2", "data3", "data4"}, {{0.5, 0}, {0.8, 1.2}}, Rotate[#, (1.75/7) Pi] &], Placed[{"", ""}, Above]}, LabelingFunction -> ( ...


3

You can use RectangleChart with the option setting BarSpacing->-1: opts1 = {BarSpacing -> -1, ChartStyle -> {Opacity[.5, Red], Opacity[.5, Green]}}; rc1 = RectangleChart[{{2, 1}, {3, 4}}, opts1] To add the ticks to the horizontal axis: opts2 = Join[opts1, {Frame -> {True, True, False, False}, FrameTicks -> {{#, # + 1} & /@ ...


3

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, ...


2

The function errorBar can be found in the Documentation Center page How to -- Add Error Bars to Charts and Plots. You can change the function errorBar to take a scaling function argument: errorBar2[sf_: Identity, type_: "Rectangle"][{{x0_, x1_}, {y0_, y1_}}, value_, meta_] := Block[{error, isf = InverseFunction[sf][y1]}, error = Flatten[meta]; ...


1

On my computer Windows 7, Mathematica 9, your code renders a perfectly black bar! To understand if problem may be OS or Mathematica version related, please specify OS and Mathematica version.


1

labeleddata = Transpose@Map[Labeled[#, Rotate[#2, Pi/2], Above] & @@ # &, Transpose /@ ({#, N@Normalize[#, Total]} & /@ Transpose@data), {2}]; BarChart[labeleddata] or labeleddata2 = Transpose[Labeled[#, Rotate[#2, Pi/2], Above] & @@@ # & /@ (Transpose /@ ({#, N@Normalize[#, Total]} ...



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