another stab at getting barcodes into the mix#24
another stab at getting barcodes into the mix#24DeliciousHair wants to merge 3 commits intoscikit-tda:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24 +/- ##
==========================================
- Coverage 75.90% 72.41% -3.50%
==========================================
Files 20 20
Lines 1457 1526 +69
Branches 298 317 +19
==========================================
- Hits 1106 1105 -1
- Misses 293 360 +67
- Partials 58 61 +3
Continue to review full report at Codecov.
|
|
I see, failure due to lack of tests written. Any ideas how I can address this? |
|
Thanks for this PR!! I wouldn't worry too much about the codecov results. Testing plotting code can be pretty nebulous. Could you post come screenshots of the output this produces into a comment? |
|
Awesome! Thanks again for picking this up! Does it look the same if you plot above Would it be easy to make the x-axes the same for all of the sets? I could see it being helpful for comparisons, but also annoying if each have different scales. What do you think? In the |
No problem, I was using the feature after all
No, if dim != 2 then individual plots are produced for each dimension. I can extend this up to
Very easy, but the question arises about the number of bars for small
The linewidth is already controllable via the Would you like me to do that? |
sauln
left a comment
There was a problem hiding this comment.
Sorry for the long delay getting back to you about this. This all looks really good!
I added some comments. Mostly small changes to the api.
Once those are done, could you try generating the docs site to make sure it looks how you want? You should be able to run sphinx in the docs directory and then open up the generated html in your local browser.
I think to get the additions to render, you'll have to add a line or two in the docs rst files. Let me know if you need any help with that.
|
Sorry for abandoning this, was far too busy at the time to deal with it, then forgot all about it. Saw it today and thought I should fix it up. Better late than never! |
* Code layout changed to play nice with sphinx docs template used * removed useless `plot_a_bar` function

I noticed that the current PR #22 for a barcode visualisation is failing, so I thought I'd try to fix up whatever the problem is, and in the process decided make the thing a little more to my tastes. Main change is that the H0 and H1 barcodes are combined in a single plot with finer lines than previous (since this is the most common scenario to examine) and individual plots for each dimension are produced if dim != 2.
As well, the optional
export_pngkeyword argument in theplot_bacode()method will cause a PNG version of the barcode to be returned as anio.BytesIO()object.Example use is included in the docstring for the
Barcodeclass: