Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Adding coloured Polygon to a BarChart

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83952] Adding coloured Polygon to a BarChart
  • From: tomfabtastic at hotmail.com
  • Date: Wed, 5 Dec 2007 07:14:24 -0500 (EST)

Hi,

The below chart successfully uses Epilog to include some text on the
BarChart:

Needs["BarCharts`"]
barShape1 =
 BarChart[{1, 2, 3},
  Epilog -> {Style[Text["First", {1, 2}, {0, -1}], 12, Red, Bold]}]

However, I want to add a small Polygon to the graph. Again this works
well as long as the Polygon is black:

barShape2 =
 BarChart[{1, 2, 3},
  Epilog -> {Style[Text["First", {1, 2}, {0, -1}], 12, Red, Bold],
    Polygon[{{1.25, 2}, {1.5, 2}, {1.5, 2.25}, {1.25, 2.25}}]}]

But I would like to make the Polygon a red colour. But the below does
not work :

barShape3 =
 BarChart[{1, 2, 3},
  Epilog -> {Style[Text["First", {1, 2}, {0, -1}], 12, Red, Bold],
    Graphics[{Red,
      Polygon[{{1.25, 2}, {1.5, 2}, {1.5, 2.25}, {1.25, 2.25}}]}]}]

Does anyone have a suggestion for adding a coloured Polygon to a
BarChart ?

Regards,
Tom


  • Prev by Date: Re: Partition a list into sublists of unequal size
  • Next by Date: Printing Subscripted Variable on Screen?
  • Previous by thread: Re: Re: expressions list -> equations list
  • Next by thread: Re: Adding coloured Polygon to a BarChart