mcmlter / MDV-ClimEx

An RShiny web application for visualizing high frequency meteorological data and identifying extreme climate events in the McMurdo Dry Valleys of Antarctica.
https://mcmlter.org/MDV-ClimEx
GNU General Public License v3.0
1 stars 0 forks source link

Fix unit formatting #5

Open rfbrown opened 3 months ago

rfbrown commented 3 months ago

E.g., m^2 should be m2 E.g., W/m^2 should be W m-2

Additionally, remove units from plotly titles, as listing the units in the y-axis suffices.

rfbrown commented 2 months ago

This issue is complicated by the fact that there need to be separate solutions for the dropdown menu display and the plots themselves. For example, this code will fix the plotly display, but not the display of the dropdown menus:

# Replace units with LaTeX format for plotly varMatchTable$names <- sapply(varMatchTable$names, function(name) { gsub("(W/m\\^2)", "W/m<sup>-2</sup>", name) })