Tag Info

Hot answers tagged

6

You can divide all of your data by 1/10th of the smallest absolute value before doing the log transform. This essentially scales the data to all have logs greater than one without adding a discontinuity on your axis. Then you can show the sign*log of positive and negative values from your original data on the same axis. d = {-3.7*^-7, -1.81*^8, 1.5*^6, ...


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


5

This isn't pretty, but it works: BarChart[{ {Labeled[1,"c1"],Labeled[3,"c2"],Labeled[4,"c3"]},{Labeled[4,"c4"], Labeled[5,"c5"]}}, ChartLabels -> {{"r1","r2"},None} ]


4

Is it sufficient to simply visualise the RealExponent - in this case, at least. I added some chart junk for added benefit. BarChart[RealExponent[{mylist1[[All, 2]], mylist2[[All, 2]]}]/.-Infinity->0, AxesOrigin -> {0, 0}, AxesLabel -> {"", "Exponent"}, ChartLegends -> mylist1[[All, 1]], ChartLabels -> {Placed[{Panel["mylist1"], ...


4

You can define a function to label the data using Labeled as in @David's answer: lblngF = MapIndexed[Function[{d, p},Labeled[d, #2[[1]][[## & @@ p]]]], #, {#2[[2]]}] &; lblF = Fold[lblngF, #, Thread[{Reverse@#2, {2, 1}}]] &; dt = {{1, 3, 4}, {4, 5}}; labels = {{"r1", "r2"}, {{"c1", "c2", "c3"}, {"c4", "c5"}}}; BarChart[lblF[dt, labels]] ...


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

It's quite easy once one finds out the correct symbols for the various indices. I found them on Yahoo. Column[ TradingChart[{#, {{2015, 7, 24}, {2015, 8, 24}}}, {"Volume", "SimpleMovingAverage", "BollingerBands"}, PlotLabel -> #, ImageSize -> Medium] & /@ {"SP500", "^AXJO", "^SSEC", "^N225"}, Spacings -> ...


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