[Python] How to customize automatic row labels in seaborn FacetGrid? How to get single xlabel...

Discussão em 'Python' iniciado por Stack, Março 20, 2025.

  1. Stack

    Stack Membro Participativo

    I would like to know how to customize the row labels of the FacetGrid. There is an automatic value 0.0, 0.1 and so on to be changed into "ratio <5%", "ratio <10%", ....

    Also would like to know how to have a single xlabel and ylabel (not repeated to each facet of the grid).

    See Python image and R image.

    g = sns.FacetGrid(df,
    col="chlorides_rounded",
    height=3.3,
    row='ratio_sulfur.dioxide_rounded',
    margin_titles=True,
    hue='quality_bucket',
    hue_order=['High', 'Medium', 'Low'],palette = 'RdYlGn_r')

    g = (g.map(plt.scatter, "density", "alcohol", **kws).add_legend(markerscale=2))


    [​IMG]

    [​IMG]

    Continue reading...

Compartilhe esta Página