Mathematica Bar Chart Error Bars
Contents |
Mathematica Wolfram|Alpha Appliance Enterprise Solutions Corporate Consulting Technical Services Wolfram|Alpha Business Solutions Products for Education Wolfram|Alpha Wolfram|Alpha Pro Problem Generator API Data Drop Mobile Apps asymmetric error bars mathematica Wolfram Cloud App Wolfram|Alpha for Mobile Wolfram|Alpha-Powered Apps Services Paid
Mathematica Error Bars Log Plot
Project Support Training Summer Programs All Products & Services » Technologies Wolfram Language Revolutionary knowledge-based programming
Mathematica Errorlistplot Not Working
language. Wolfram Cloud Central infrastructure for Wolfram's cloud products & services. Wolfram Science Technology-enabling science of the computational universe. Computable Document Format Computation-powered interactive documents.
Mathematica Error Bar Style
Wolfram Engine Software engine implementing the Wolfram Language. Wolfram Natural Language Understanding System Knowledge-based broadly deployed natural language. Wolfram Data Framework Semantic framework for real-world data. Wolfram Universal Deployment System Instant deployment across cloud, desktop, mobile, and more. Wolfram Knowledgebase Curated computable knowledge powering Wolfram|Alpha. All Technologies » Solutions Engineering, R&D errorbar plotting package mathematica download Aerospace & Defense Chemical Engineering Control Systems Electrical Engineering Image Processing Industrial Engineering Mechanical Engineering Operations Research More... Education All Solutions for Education Web & Software Authoring & Publishing Interface Development Software Engineering Web Development Finance, Statistics & Business Analysis Actuarial Sciences Bioinformatics Data Science Econometrics Financial Risk Management Statistics More... Sciences Astronomy Biology Chemistry More... Trends Internet of Things High-Performance Computing Hackathons All Solutions » Support & Learning Learning Wolfram Language Documentation Fast Introduction for Programmers Training Videos & Screencasts Wolfram Language Introductory Book Virtual Workshops Summer Programs Books Need Help? Support FAQ Wolfram Community Contact Support Premium Support Premier Service Technical Services All Support & Learning » Company About Company Background Wolfram Blog News Events Contact Us Work with Us Careers at Wolfram Internships Other Wolfram Language Jobs Initiatives Wolfram Foundation MathWorld Computer-Based Math A New Kind of Science Wolfram Technology for Hackathons Student Ambassador Program Wolfram fo
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us mathematica error bar package Learn more about Stack Overflow the company Business Learn more about hiring developers barchart mathematica or posting ads with us Mathematica Questions Tags Users Badges Unanswered Ask Question _ Mathematica Stack Exchange is a question errorbar plotting package download and answer site for users of Mathematica. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted https://reference.wolfram.com/language/howto/AddErrorBarsToChartsAndPlots.html up and rise to the top ErrorBars with BarChart, ChartLabels are not working? up vote 6 down vote favorite In the Add Error Bars to Charts and Plots How To in the Mathematica documentation a function ErrorBar is given: errorBar[type_: "Rectangle"][{{x0_, x1_}, {y0_, y1_}}, value_, meta_] := Block[{error}, error = Flatten[meta]; error = If[error === {}, 0, Last[error]]; {ChartElementData[type][{{x0, x1}, {y0, y1}}, value, meta], {Black, Line[{ http://mathematica.stackexchange.com/questions/2654/errorbars-with-barchart-chartlabels-are-not-working {{(x0 + x1)/2, y1 - error}, {(x0 + x1)/2, y1 + error}}, {{1/4 (3 x0 + x1), y1 + error}, {1/4 (x0 + 3 x1), y1 + error}}, {{1/4 (3 x0 + x1), y1 - error}, {1/4 (x0 + 3 x1), y1 - error}} }] }} ] that adds error bars to BarChart. Here is an example using some random data with random errors: chartData = MapThread[{#1 -> #2} &, {RandomReal[1, 10], RandomReal[0.1, 10]}] and some random labels: labels = ToString /@ RandomReal[100000, 10] Now plotting it, as per the tutorial: BarChart[chartData, ChartElementFunction -> errorBar["Rectangle"], ChartLabels -> Placed[labels, Axis, Rotate[#, Pi/2] &]] The labels are: {"99539.6", "17862.9", "14683.4", "32667.2", "42690.", "70230.8", "59050.4", "59204.7", "9138.2", "19080.3"} However, in the plot: The first label is repeated incorrectly for all the bars, what's going on here? Without error bars the labels on the plot are correct: BarChart[RandomReal[1, 10], ChartLabels -> Placed[labels, Axis, Rotate[#, Pi/2] &]] graphics plotting share|improve this question edited Mar 17 at 15:38 István Zachar 28.8k1493220 asked Mar 6 '12 at 22:10 s0rce 6,06622465 add a comment| 1 Answer 1 active oldest votes up vote 7 down vote accepted In the original code, chartData is of the for
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn http://mathematica.stackexchange.com/questions/35462/how-to-plot-barchart-with-error-bars-on-logarithmic-scale-in-mathematica-9 more about hiring developers or posting ads with us Mathematica Questions Tags Users Badges Unanswered http://mathematica.stackexchange.com/questions/61672/spacing-the-elements-in-a-bar-chart-with-error-bars Ask Question _ Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top How to plot BarChart with error bars on logarithmic scale in error bar Mathematica 9? up vote 8 down vote favorite 1 I'm quite new in Mathematica, and I would like to ask you to consider the next case: I need to plot bar chart with error bars on logarithmic scale. From Wolfram site I took the function which allows to plot error bars on a bar chart with normal (non-log) scaling. Thus, my ugly actual code looks like: errorBar[type_: "Rectangle"][{{x0_, x1_}, {y0_, y1_}}, value_, meta_] := Block[{error}, mathematica error bar error = Flatten[meta]; error = If[error === {}, 0, Last[error]]; { ChartElementData[type][{{x0, x1}, {y0, y1}}, value, meta], {Black, Line[{{{(x0 + x1)/2, y1 - error}, {(x0 + x1)/2, y1 + error}}, {{1/4 (3 x0 + x1), y1 + error}, {1/4 (x0 + 3 x1), y1 + error}}, {{1/4 (3 x0 + x1), y1 - error}, {1/4 (x0 + 3 x1), y1 - error}}}]} } ] figdata = {{4.01 -> 0.76, 1.73 -> 0.14, 3.95 -> 0.35}, {68.53 -> 16.32, 77.77 -> 11.13, 81.39 -> 27.32}}; xlables = {"r1", "r2"}; leftframename = "Frequency"; BarChart[ figdata, ChartElementFunction -> errorBar["Rectangle"], ChartStyle -> {White, Gray, Black}, ChartLabels -> {xlables, None}, FrameLabel -> {None, Style[leftframename, 15, FontFamily -> "OpenSans"]}, FrameTicks -> {{{0, 10, 100, 1000}, None}, {None, None}}, Frame -> Left, BarSpacing -> {0, 0.5}, BaseStyle -> {FontWeight -> "Bold", FontSize -> 15}, ScalingFunctions -> "Log"] And this produce the following graph: which is not what I really would like to receive. The problems, that I don't know how to solve: How to plot error bars in a proper way on log scale in BarChart? How to make FrameTicks visible and on the same distance between each other? Could anyone help me to put this together into working decision? plotting logarithmic-scale share|improve this question edited Nov 5 '13 at 22:50 Artes 39.9k8106186 asked Nov 5 '13 at 22:00 M
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Mathematica Questions Tags Users Badges Unanswered Ask Question _ Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Spacing the elements in a bar chart with error bars up vote 7 down vote favorite 2 In the Add-Error-Bars-to-Charts-and-Plots How-To in the Mathematica documentation, a function ErrorBar is given: errorBar[type_: "Rectangle"][{{x0_, x1_}, {y0_, y1_}}, value_, meta_] := Block[{error}, error = Flatten[meta]; error = If[error === {}, 0, Last[error]]; {ChartElementData[type][{{x0, x1}, {y0, y1}}, value, meta], {Black, Line[{ {{(x0 + x1)/2, y1 - error}, {(x0 + x1)/2, y1 + error}}, {{1/4 (3 x0 + x1), y1 + error}, {1/4 (x0 + 3 x1), y1 + error}}, {{1/4 (3 x0 + x1), y1 - error}, {1/4 (x0 + 3 x1), y1 - error}} }] }} ] This function adds error bars to BarChart. Here is an example using some random data with random errors: chartData = MapThread[{#1 -> #2} &, {RandomReal[1, 10], RandomReal[0.1, 10]}] Now plotting it, as per the tutorial: BarChart[chartData, ChartElementFunction -> errorBar["Rectangle"]] How can I adjust variable spacing between the bars, e.g. have two groups of five bars without any spacing between them, and then a spacing of, say, 1 between the two groups? plotting share|improve this question edited Oct 9 '14 at 13:08 m_goldberg 54.9k652141 asked Oct 9 '14 at 12:45 user18798 31517 add a comment| 3 Answers 3 active olde