JetBrains / lets-plot

Multiplatform plotting library based on the Grammar of Graphics
https://lets-plot.org
MIT License
1.57k stars 51 forks source link

labels no longer working (xlab and ylab) in 4.4.0 #1164

Closed anne-uplevel closed 2 months ago

anne-uplevel commented 2 months ago

Adding custom labels to axes with xlab and ylab no longer seem to work with the recent upgrade.

The following code works in 4.3.3 but not 4.4.0:

g = ggplot(df, aes(x='x1', y='y1')) + geom_point() + theme_light() + \
    geom_line(data=above_df, mapping=aes(x='x', y='y'), col='red') + \
    geom_line(data=below_df, mapping=aes(x='x', y='y'), col='blue') + \
    xlab("Custom x label here") + \
    ylab("Custom y label here")
g.show()

Adding xlab and ylab causes the graph to render completely white and show nothing.

alshan commented 2 months ago

Hi, this should work ) Try to restart the kernel + clear all outputs + reload the browser window.

anne-uplevel commented 2 months ago

I am using PyCharm 2024.1.3 (Professional Edition). I shut down the program entirely and restarted. That did not work.

alshan commented 2 months ago

Are you using a notebook in PyCharm or are you building plots in Python scripts and displaying them using "Lets-Plot in SciView plugin"? If the latter, please make sure to upgrade the plugin to the most recent version (1.1.24.nnn).

anne-uplevel commented 2 months ago

Yes! Upgrading the plugin did it. Thank you so much!