# Problem with Scaling Functions

I'm trying to build a BarChart off of a table of discrete data. I would like to use ScalingFunctions. Not working. Here is my code:

StepPyramid04 = BarChart[{WDscrt4},
ChartElementFunction->"ObliqueRectangle",
ScalingFunctions->{"Log2",None},
ChartStyle->{Red,Red,Red,Green,Green,Green,Green,Green,Green,Green,Green,Green,Green,Green,Green,Green,Blue,Blue,Blue,Blue},
ChartLabels->{"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"},
AspectRatio->2/\[Pi],
GridLines->Automatic,
BarSpacing->Automatic,
AxesLabel->Automatic
]


My error message reads:

VisualizationUtilitiesScalingDumpmhead::sclfn: The scaling function {Log2,None} cannot
be used to scale coordinates.


Advice? Suggestions?

• Why not just ScalingFunctions -> "Log2"? Nov 9 '20 at 23:56
• OKCarl, may I suggest that you revisit your 13 questions and see if any answers are worth accepting/upvoting?
– kglr
Nov 10 '20 at 0:27

## 1 Answer

For two dimensional functions,

ScalingFunctions -> "Log2"


is equivalent to

ScalingFunctions -> {None, "Log2"}


In BarChart, though, this is not the case. BarChart effectively has only one axis, used to measure the bar heights with. So, using either

ScalingFunctions -> {None, "Log2"}


or

ScalingFunctions -> {"Log2", None}


will generate that message.

ScalingFunctions -> {"Log2"}
`

works, though.

• Thank you Mister rcollyer. Your last option works. Nov 11 '20 at 1:07
• @OKCarl this site's "currency" is upvotes and accepted answers. The accepted answers, in particular, are needed to highlight the work, presenting it to others as useful/canonical. Yet, for none of your questions have you marked any of the answers as accepted, despite you comment, above. Please, if you find them useful, mark the best as accepted. Nov 11 '20 at 13:58