1

I am trying to use plotnine to build graphs and I keep coming across the same KeyError problem when I want to plot. See the traceback error below. KeyError: 'reds'

My key code is below:

p6=(ggplot(df, aes(x='SOD',y='tau',fill='age',size='age')) + 
    geom_point(shape='o',color="black",stroke=0.25,alpha=0.8)+
         scale_size(range = (1, 8))+
         scale_fill_distiller(type='seq', palette='reds') +
         theme(text=element_text(size=12,colour = "black"),
    aspect_ratio =1,
    dpi=100,
   figure_size=(4,4))) #shape=21,color="black",fill="red",size=3,stroke=0.1
print(p6)
yuancf1024
  • 67
  • 1
  • 5

0 Answers0