# How can you create an equivalent plot to geom\_density from R in python plotly?

**URL:** <https://community.plotly.com/t/how-can-you-create-an-equivalent-plot-to-geom-density-from-r-in-python-plotly/18600>\
**Category:** 📊 Plotly Python\
**Created:** [January 26, 2019, 6:09am UTC](https://community.plotly.com/t/how-can-you-create-an-equivalent-plot-to-geom-density-from-r-in-python-plotly/18600 "2019-01-26T06:09:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rphila](https://avatars.discourse-cdn.com/v4/letter/r/6bbea6/32.png) [@rphila](https://community.plotly.com/u/rphila)\
**Post date:** [January 26, 2019, 6:09am UTC](https://community.plotly.com/t/how-can-you-create-an-equivalent-plot-to-geom-density-from-r-in-python-plotly/18600/1 "2019-01-26T06:09:30Z")

</div>

> **[geom\_density](https://plot.ly/ggplot2/geom_density/)**
>
> Add a smooth density estimate calculated by stat\_density with ggplot2 and R. Examples, tutorials, and code.

---

<div class="post-metadata">

**Author:** ![jmmease](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jmmease/32/3706_2.png) [@jmmease](https://community.plotly.com/u/jmmease)\
**Post date:** [January 28, 2019, 10:25am UTC](https://community.plotly.com/t/how-can-you-create-an-equivalent-plot-to-geom-density-from-r-in-python-plotly/18600/2 "2019-01-28T10:25:21Z")

</div>

Hi @rphila,

The closest high-level approach in plotly.py is probably the distplot figure factory ([https://plot.ly/python/distplot/](https://plot.ly/python/distplot/)).

-Jon
