wilkelab / ggtext

Improved text rendering support for ggplot2
https://wilkelab.org/ggtext/
GNU General Public License v2.0
650 stars 37 forks source link

Error in upgradeUnit.default(x) : Not a unit object #88

Open choiceMaster-ai opened 2 years ago

choiceMaster-ai commented 2 years ago

Hi. I have suddenly received the error: Error in upgradeUnit.default(x) : Not a unit object executing a ggplot when I use: ... theme( plot.title.position = "plot", plot.title = ggtext::element_textbox_simple( size = 12, hjust = 0.5, lineheight = 1, padding = margin(5.5, 5.5, 5.5, 5.5), margin = margin(0, 0, 5.5, 0), fill = "cornsilk" )) + ...

ggplot2 version is 3.3.6 ggtext version is 0.1.1 gridtext version is 0.1.4

If I comment out the above code in the plot specification then the plot works?

Thank you