5
$\begingroup$

I have a simple example:

Plot[UnitConvert[Quantity[x, "DegreesCelsius"], "DegreesFahrenheit"], {x, -25, 300}, 
  AxesLabel -> Automatic]

The x-axis has the label $x$ and the y-axis has the label $°F$. What am I doing wrong that x-axis does not get the label $°C$?

$\endgroup$
5
$\begingroup$

"DegreesCelsius" does not appear in

UnitConvert[Quantity[x, "DegreesCelsius"], "DegreesFahrenheit"]

enter image description here

So you have to be more explicit:

Plot[UnitConvert[Quantity[x, "DegreesCelsius"], "DegreesFahrenheit"], {x, -25, 300},
 AxesLabel -> {Quantity["", "DegreesCelsius"], Automatic}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.