[Python] How to log scale in seaborn

Discussão em 'Python' iniciado por Stack, Abril 15, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using seaborn to plot some biology data.

    I want a distribution of one gene against another (expression in ~300 patients), and the following code works fine.

    graph = sns.jointplot(x='Gene1', y='Gene2', data=data, kind='reg')


    I like that the graph gives me a nice linear fit and a PearsonR and a P value.

    [​IMG]

    However, I want to plot my data on a log scale, which is the way that such gene data is usually represented.

    I've looked at a few solutions online, but they all get rid of my PearsonR value or my linear fit or they just don't look as good. For example, one implementation is shown below. It doesn't show the line of fit or the statistics.

    [​IMG]

    Continue reading...

Compartilhe esta Página