MathGroup Archive 2007

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

Search the Archive

Re: Vertical tick labels in BarChart

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84160] Re: Vertical tick labels in BarChart
  • From: sdw <nospam.warwick at jps.net>
  • Date: Wed, 12 Dec 2007 01:17:38 -0500 (EST)
  • Organization: Posted via Supernews, http://www.supernews.com
  • References: <fj8qal$jg5$1@smc.vnet.net> <fjb0c1$s6i$1@smc.vnet.net> <fjms28$pk6$1@smc.vnet.net>

this looked good at first glance,  but then looked bad when I tried

BarLabels -> {Experimental`Rotated["alpha beta", \[Pi]/2],
   Experimental`Rotated["b", Pi/2], "c"}]

here, instead of aligning the "top" of the boxes,  it aligned the 
centers.   

this is close, but in my opinion not as nice as having the tops aligned.

Still think that they fundamentally need to address the ticks problem 
and allow for graphics objects. 


John Jowett wrote:
> I can give another answer to my original question that was given to me
> by Carl Woll of Wolfram Research.  It uses an experimental feature of
> Mathematica so is subject to the usual caveats that it may have some
> bugs, is experimental and subject to change:
>
> labelsr = (Experimental`Rotated[#1, Pi/2] &) /@ labels
>
> BarChart[vals, BarLabels -> labelsr]
>
> This is very nice and easy and provides a lot of flexibility.  You can
> rotate the labels by arbitrary angles, rotate only a subset, etc.
>
> John
>
>
>
> On Dec 7, 9:30 am, dh <d... at metrohm.ch> wrote:
>   
>> Hi John,
>>
>> is the following acceptable?
>>
>> BarChart[vals,BarLabels->labels,BarOrientation->Horizontal]
>>
>> Daniel
>>
>>
>>
>> John Jowett wrote:
>>     
>>> I would have thought this is a FAQ but it doesn't seem to be ...
>>>       
>>> Consider the following construction of simple Bar Charts where the bar
>>> labels are strings.  The first one looks OK. In the second one, where
>>> there are more bars, it's a mess because all the labels overlap
>>> (unless the graphics is increased a lot in size):
>>>       
>>> Needs["BarCharts`"]
>>>       
>>> labels = {"MQM.A7L2B1", "MQMC.9R2.B1", "MQTLI.11R2.B1"};
>>> vals = {5, 6, 7};
>>>       
>>> BarChart[vals, BarLabels -> labels]
>>>       
>>> vals = Flatten[Table[vals, {5}]];
>>> labels = Flatten[Table[labels, {5}]];
>>>       
>>> BarChart[vals, BarLabels -> labels]
>>>       
>>> This could be neatly solved if the labels were oriented vertically
>>> instead of horizontally (it's easy to do this, e.g., in certain
>>> spreadsheet applications).  However I can't find any option that
>>> allows it.
>>> I suspect it might be possible using some special Ticks construction
>>> but haven't taken the time to see.   But this should be easy ... does
>>> anyone know how ?
>>>       
>>> Thanks,
>>> John Jowett- Hide quoted text -
>>>       
>> - Show quoted text -
>>     
>
>
>   


  • Prev by Date: Re: Prefix Forms on the BasicMath Palette
  • Next by Date: Re: efficient programming problem
  • Previous by thread: Re: Vertical tick labels in BarChart
  • Next by thread: Ndsolve