# Degree distribution plot on matplotlib

**URL:** <https://igraph.discourse.group/t/degree-distribution-plot-on-matplotlib/1444>\
**Category:** Usage\
**Tags:** Python\
**Created:** [19 December 2022 21:22 UTC](https://igraph.discourse.group/t/degree-distribution-plot-on-matplotlib/1444 "2022-12-19T21:22:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igraph\_Newbie](https://avatars.discourse-cdn.com/v4/letter/i/b2d939/32.png) [@Igraph\_Newbie](https://igraph.discourse.group/u/Igraph_Newbie)\
**Post date:** [19 December 2022 21:22 UTC](https://igraph.discourse.group/t/degree-distribution-plot-on-matplotlib/1444/1 "2022-12-19T21:22:50Z")

</div>

I am trying to plot the degree distribution histogram on matplot, however, I am running into the following error. I understand I can get the bins and maybe plot them that way, but what am I doing wrong here?  
Attached the error and sample code

> AttributeError: ‘MatplotlibHistogramDrawer’ object has no attribute ‘\_min’

```auto
    import igraph as ig
    import matplotlib.pyplot as plt

    G_ig = ig.Graph.Read(filename)
    deg_dist = G_ig.degree_distribution()

    fig, ax = plt.subplots()
    ig.plot(deg_dist, target=ax).show()

```
