RE: BarCharts and vertical axes

*To*: mathgroup at christensen.cybernetics.net*Subject*: [mg509] RE: [mg496] BarCharts and vertical axes*From*: "LAUER Marie-Reine 154851" <LAUER at dtp.cea.fr>*Date*: 06 Mar 95 14:30:37-0000

Dear Mathgrouper, I am facing with the problem to draw bar charts of quantities whose value is close. BarChart put the beginning of the vertical axis at 0 and automatically squeezes the differecences I need on the contrary to emphasize. Does anybody has had the same problem ? The feature I like in BarChart is the possibility to have non numerical abscissas. In other case I would have used FilledListPlot (* In Graphics`FilledPlot *) after having properly preprocessed my data: data={-0.825, -0.925, -0.825, -0.825, -0.675, -1.025, -0.875, -0.975, -0.975, -0.825}; cl=Frequencies[data]; (* In Statistics`DataManipulation` *) delta=0.025; bottomvalue=0.5; preprodata=Flatten[{{#[[1]]-delta,bottomvalue}, {#[[1]]-delta+delta/100.,#[[2]]}, {#[[1]]+delta-delta/100.,#[[2]]}, {#[[1]]+delta,bottomvalue}}& /@ cl,1]; ListFilledPlot[preprodata,PlotJoined->True,PlotRange->{0,5}, Axes->False,Frame->True] In my BarChart-histogram I would also put the possibility to: i) label each bar; ii) color each bar according to a list of weights (this is useful if you want to plot some fitted values which have different regression coefficients and you do not want to lose this informations). Thank you in advance for any help or suggestion. Riccardo Rigon, Ph. D. Civil Egineering Department Texas A&M University College Station, TX 77843 ph: (409)-845-0335 fax: (409)-862-1542 e-mail: rrigon at zeus.tamu.edu That is a little function which may help you, regards barchart [listfrequency_,step_]:= Show[Graphics[{Map[{Rectangle[{#[[1]],0}, {#[[1]]+step,#[[2]]}]}&, listfrequency]}], Axes->True, AxesOrigin->{Min[Map[#[[1]]&,listfrequency]]-step, 0}] ------------------------------------------------------------- Marie-Reine LAUER DTP/SECC Centre d'Etudes Nucleaires de Grenoble 17 rue des Martyrs 38054 Grenoble Cedex 9 tel. : 76 88 45 62 FAX : 76 88 51 84 E-Mail : lauer at dtp.cea.fr