Re: Styling single bar in BarChart
- To: mathgroup at smc.vnet.net
- Subject: [mg110051] Re: Styling single bar in BarChart
- From: Peter Pein <petsie at dordos.net>
- Date: Sun, 30 May 2010 23:46:23 -0400 (EDT)
- References: <httfm3$sbe$1@smc.vnet.net>
Hi Dario, try mbar = BarChart[MapAt[Style[#, Red] &, populations, 19], Axes -> None, ChartStyle -> White, BarSpacing -> Large] this changes the 19th element in a copy of populations to "Style[populations[[19]],Red]". Peter Am Sun, 30 May 2010 10:46:27 +0000 (UTC) schrieb dartar <dario.taraborelli at gmail.com>: > I must be missing something trivial but I don't seem to be able to > find a way to highlight a single value from a list in a BarChart. > > mbar = BarChart[{populations, populations[[19]]}, Axes -> None, > ChartStyle -> {White, Black}, BarSpacing -> Large]; > > The above generates a bar chart of the population series with > alternate black/white colour. > > mbar = BarChart[{populations, Style[populations[[19]], Red]}, Axes -> > None, ChartStyle -> White, BarSpacing -> Large] > > This produces only white bars. > > Feedback welcome. > > Dario >