1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] lower bound to kernel density estimation with seaborn for matplotlib in python

Discussão em 'Python' iniciado por Stack, Setembro 15, 2024.

  1. Stack

    Stack Membro Participativo

    I have a collection of measured tree diameters and am trying to plot a histogram with a kernel density estimation superimposed on top in python. The seaborn module lets me do this quite simply but I can find no way of specifying that the kde should be zero for negative numbers (since trees can't have negative tree diameters).

    what I've got at present is this:

    seaborn.distplot(C77_diam, rug=True, hist=True, kde=True)


    I've looked at seaborn.kdeplot which is the function that distplot calls but can't find anything useful. Does anyone know if this can be done with seaborn, and if not if it can be done with matplotlib more generally?

    I only started using seaborn because i couldn't figure out how to overlay a kde pyplot.plot() with a pyplot.hist().

    Continue reading...

Compartilhe esta Página