I'm trying to write the symbol degrees celsius with R/Plotly in one of my titles. It works when I just use a simple plot a below:
# Working code
library(latex2exp)
set.seed(1)
betas <- rnorm(1000)
hist(betas, main = TeX("Temperature (^0C)"))
However, when I try to run the code through plotly, I get the following error: "unimplemented type 'expression' in 'HashTableSetup'".
#Initialise the plot
p <- plot_ly()
#Add axis names
#Font
f <- list(
family = "Courier New, monospace",
size = 18,
color = "#7f7f7f")
#X axis name
x <- list(
title = "x Axis",
titlefont = f)
#Y Axis name
y <- list(
title = TeX("Temperature (^0C)"),
titlefont = f)
#Add layout
p <- p %>%
layout(xaxis = x, yaxis= y)
p
Any ideas?
The symbol for degrees Rankine is °R (or °Ra if necessary to distinguish it from the Rømer and Réaumur scales). By analogy with the SI unit, the kelvin, some authors term the unit Rankine, omitting the degree symbol.
Insert the degree symbol by using a keyboard shortcut On your keyboard, press Alt + 0176. Note: This method works only for keyboards that include a 10-key numeric pad.
The degree Celsius (symbol: °C) can refer to a specific temperature on the Celsius scale or a unit to indicate a difference or range between two temperatures. It is named after the Swedish astronomer Anders Celsius (1701–1744), who developed a similar temperature scale in 1742.
Try,
title = "Temperature (\u00B0C)"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With