#### Re: The plot_bars function's question

Dmitriy Morozov

Hi Jay,

It looks like we are not plotting points/bars at infinity. I don't recall doing this on purpose, so we should consider it a bug. Can you file an issue on GitHub?

Thanks.
Dmitriy

On Wed, Feb 27, 2019 at 8:23 PM "周浩文 <zhw96@...> wrote:
Hi Dimitriy,

I'm new to Dionysus (and to studying homology persistence),when I try to use Dionysus2 to achieve the learning-demo(from http://outlace.com/TDApart5.html),I got a problem which the plot_bars missing the longest bar in Betti 0,but the plot_bars work in Betti 1 is right.

My achieve     should be
this is my code:

import numpy as np
import dionysus as d
from __future__ import print_function

data = np.array([[1,4],[1,1],[6,1],[6,4]],dtype='double')
f = d.fill_rips(data, 2, 8.0)
p = d.homology_persistence(f)
dgms = d.init_diagrams(p, f)

d.plot.plot_bars(dgms[0],order='birth')

when I want to print the p,I got these message:

```<0> 0:
<1> 0:
<2> 0:
<3> 0:
<0,1> 3:1 * <0> 0+1 * <1> 0
<2,3> 3:1 * <2> 0+1 * <3> 0
<0,3> 5:1 * <0> 0+1 * <2> 0
<1,2> 5:
<0,2> 5.83095:
<1,3> 5.83095:
<0,1,2> 5.83095:1 * <0,1> 3+1 * <1,2> 5+1 * <0,2> 5.83095
<0,1,3> 5.83095:1 * <0,1> 3+1 * <0,3> 5+1 * <1,3> 5.83095
<0,2,3> 5.83095:1 * <0,1> 3+1 * <2,3> 3+1 * <0,3> 5+1 * <1,2> 5
<1,2,3> 5.83095:```

Thank you very much!

Best,
Jay

Join dionysus@groups.io to automatically receive all group messages.