Closed thistlillo closed 2 years ago
The issue is mapping=aes(x=x, y=y))
should be mapping=aes(x='x'))
.
Also, to avoid other surprises make sure you are mapping to the columns 'x'
in the dataframe and not the x
value in the environment.
For the fonts, plotnine relies entirely on the backend (Matplotlib) to use the available fonts and if the fonts are installed properly and referred to accurately there should not be a problem.
I am trying to build a plot using plotnine in a Jupyeter Notebook running on a remote Jupyter server, linux machine. As dev tool I am using Visual Studio code, the libraries are installed in a conda environment.
The plot I am trying to build is:
But it gives me this error:
There was a
stat_count()
from the code I copied from a previous chart, but, as you can see, I removed it. However, it seems that someone in the pipeline did not realize I deleted it. I do not know if it is plotnine or other libraries.I am also having problems with fonts: plotnine (and involved libraries) did not realize I have installed some Serif fonts it used not to find. It keeps using a Sans-Serif font in the charts even if I specify a Serif family or a specific font. Before I installed the serif fonts, the library gave me some warnings about fonts not found. Now there are no warnings, but the fonts in the plots are always the sans-serif default one.
I tried to kill/restart the kernel/visual studio code, but the issue did not go away. Using: