# Incomplete implementation of units?

I've been playing around with the new units capability in MMA9 and I'm becoming a bit frustrated with what I perceive as an incomplete implementation of this capability and I'm wondering if there are other similar examples.

For example, Histogram[] can take a list of quantities and a TargetUnits specification and it will scale the plot appropriately:

data = Quantity[RandomVariate[NormalDistribution[0, 1], 100], "Meters"];
Histogram[data, AxesLabel -> Automatic, TargetUnits -> "Meters"]


Histogram[data, AxesLabel -> Automatic, TargetUnits -> "Centimeters"]


But the options for Histogram[] do not appear to allow units specifications, which seems dangerous to me and can have some (obvious but) strange results if care is not taken.

As an example, specifying bspec = {-3, 3, 0.2} assuming that the units are in meters results in a figure that looks something like this:

Histogram[data, {-3, 3, 0.2}, AxesLabel -> Automatic, TargetUnits -> "Meters"]


If we then change the TargetUnits to centimeters, here's what happens:

Histogram[data, {-3, 3, 0.2}, AxesLabel -> Automatic, TargetUnits -> "Centimeters"]


Needless to say, one could readily draw a completely different conclusion about the nature of the data even though the only thing that's changed is the output units.

To me this seems like an incomplete implementation and I'm wondering if anyone else has encountered a similar issue elsewhere? If so, I'm tempted to avoid the new units capability until it's more mature.

-
But isn't it what it should look like? If we set target units to centimeters then specs are in centimeters also. –  swish Dec 25 '12 at 16:02
I was thinking (perhaps incorrectly) that TargetUnits only applied to the output scale and that it wouldn't change the structure of a figure. I still believe that the proper way to address this question would be to add units to specs such as bspec. –  David Skulsky Dec 25 '12 at 23:01
New units capability is definitely a work in progress. I've already logged 2 bug reports including one for TargetUnits because I can't even reproduce the documentation examples. For example, try ListLinePlot[RandomReal[{0, 5}, {20}], TargetUnits -> {"Seconds", "Feet"}, AxesLabel -> Automatic] Under Windows at least s is the y-axis label and there's nothing on x. –  geraldcecil Dec 27 '12 at 15:23
@geraldcecil: It looks like the example you listed now works in MMA 9.0.1 –  David Skulsky Jan 31 '13 at 23:03