Re: Mathematica 7: PieChart: opacity of a sector label?
- To: mathgroup at smc.vnet.net
- Subject: [mg93894] Re: [mg93878] Mathematica 7: PieChart: opacity of a sector label?
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Fri, 28 Nov 2008 05:06:10 -0500 (EST)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <200811271034.FAA08900@smc.vnet.net>
- Reply-to: murray at math.umass.edu
Wrap the label with an appropriate Style function. PieChart[{0.3, 1 - 0.3}, ChartLabels -> Placed[{Style[m1, Opacity[1]], ""}, "RadialCallout"], ChartStyle -> {Directive[Darker[Blue], Opacity[0.5]], Directive[Gray, Opacity[0.2]]}, BaseStyle -> Directive[FontFamily -> "Helvetica", 12], ImageSize -> 200] For several labels, do it individually or use Style[#,Opacity[1]]&/@theLabels. PieChart[{0.3, 1 - 0.3}, ChartLabels -> Placed[Style[#, Opacity[1]] & /@ {m1, m2}, "RadialCallout"], ChartStyle -> {Directive[Darker[Blue], Opacity[0.5]], Directive[Gray, Opacity[0.2]]}, BaseStyle -> Directive[FontFamily -> "Helvetica", 12], ImageSize -> 200] What surprises me, though, is that including the same Opacity directive in the BaseStyle does not seem to change the style of the Placed ChartLabels. Gordon Robertson wrote: > Could I ask for help with the following? In Mathematica 6, a sector's label was > automatically dark (very readable) text, independent of the Opacity[] of its > sector. In Mathematica 7, at this point I'm finding that a pie sector's label has the > opacity of its sector. For example, the following has a pale blue sector > with an 'm1' label -- but both the blue and the label have an opacity of > 0.5. Putting Opacity[1] into the BaseStyle Directive does not change this. > > PieChart[{0.3, 1 - 0.3}, > > ChartLabels -> Placed[{m1, ""}, "RadialCallout"], > > ChartStyle -> { > Directive[Darker[Blue], Opacity[0.5]], > Directive[Gray, Opacity[0.2]]}, > > BaseStyle -> Directive[FontFamily -> "Helvetica", 12], > ImageSize -> 200] > > I've studied the PieChart help documentation for some time without finding a > way to declare the label as opaque i.e. dark. I'm probably simply not seeing > what I need to see. > > Thanks in advance for your help. I'm on an Intel Mac with OS X 10.5.5. > > G -- Murray Eisenberg murray at math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305
- References:
- Mathematica 7: PieChart: opacity of a sector label?
- From: Gordon Robertson <grobertson@bcgsc.ca>
- Mathematica 7: PieChart: opacity of a sector label?