Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use subscript 2 in "CO₂" in emissions plot y-axis label #69

Closed
cjyetman opened this issue Apr 30, 2024 · 1 comment · Fixed by #80
Closed

use subscript 2 in "CO₂" in emissions plot y-axis label #69

cjyetman opened this issue Apr 30, 2024 · 1 comment · Fixed by #80

Comments

@cjyetman
Copy link
Member

Not sure how to achieve this in this context, but it would be preferable to show "CO₂" instead of "CO2"

emissions_units <-
c(
Automotive = "tons of CO2 per km per cars produced",
Aviation = "tons of CO2 per passenger km per active planes",
Cement = "tons of CO2 per tons of cement",
Coal = "tons of CO2 per tons of coal",
`Oil&Gas` = "tons of CO2 per GJ",
Power = "tons of CO2 per MWh",
Steel = "tons of CO2 per tons of steel"
)

@cjyetman
Copy link
Member Author

cjyetman commented Jun 1, 2024

"CO₂" can be written in ASCII in R by using a unicode escape

"CO\U00002082"
#> [1] "CO₂"

so this could be written as...

 emissions_units <- 
   c( 
     Automotive = "tons of CO\U00002082 per km per cars produced", 
     Aviation = "tons of CO\U00002082 per passenger km per active planes", 
     Cement = "tons of CO\U00002082 per tons of cement", 
     Coal = "tons of CO\U00002082 per tons of coal", 
     `Oil&Gas` = "tons of CO\U00002082 per GJ", 
     Power = "tons of CO\U00002082 per MWh", 
     Steel = "tons of CO\U00002082 per tons of steel" 
   ) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant