title: StopIteration error while drawing a PGMPy Networkx graph
body: <p>I have a python script that loads a csv file using pandas, and then uses pgmpy to learn a bayesian network over the data.</p>
  <p>After learning the structure, I am drawing the graph using the function:</p>
  <pre><code>nx.draw(graph_model, node_color='#00b4d9', with_labels=True)
  </code></pre>
  <p>This works perfectly in Ubuntu, However, it is throwing a StopIteration error in a virtual machine running Mac that I use to compile a Mac version.</p>
  <p>The error it is throwing is the following (I've removed the paths because it contains the name of the project and this is unpublished work):</p>
  <pre><code>StopIteration: 
  At:
    &lt;path&gt;/site-packages/matplotlib/bezier.py(352): split_path_inout
    &lt;path&gt;/site-packages/matplotlib/patches.py(2754): _shrink
    &lt;path&gt;/site-packages/matplotlib/patches.py(2771): _call_
    &lt;path&gt;/site-packages/networkx/drawing/nx_pylab.py(794): _connectionstyle
    &lt;path&gt;/site-packages/matplotlib/patches.py(4453): _get_path_in_displaycoord
    &lt;path&gt;/site-packages/matplotlib/patches.py(4440): get_path
    &lt;path&gt;/site-packages/matplotlib/axes/_base.py(2376): _update_patch_limits
    &lt;path&gt;/site-packages/matplotlib/axes/_base.py(2358): add_patch
    &lt;path&gt;/site-packages/networkx/drawing/nx_pylab.py(867): _draw_networkx_edges_fancy_arrow_patch
    &lt;path&gt;/site-packages/networkx/drawing/nx_pylab.py(889): draw_networkx_edges
    &lt;path&gt;/site-packages/networkx/drawing/nx_pylab.py(334): draw_networkx
    &lt;path&gt;/site-packages/networkx/drawing/nx_pylab.py(120): draw
    &lt;path&gt;/bayesian_network/draw_model.py(7): &lt;module&gt;
  </code></pre>
  <p>I have checked that the learned graph has nodes and edges. If I try to draw a graph with only one node, it works.</p>
  <p>I have already upgraded all of my packages, including pgmpy, matplotlib and networkx.</p>
  <p>Could this problem be related to the code being executed in a virtual machine running Mac? I currently have no access to a real Mac machine to test it.</p>