-2

I want to use brokenaxes to create a histogram with a broken y-axis in python. I found how to do that here.

to get a break between 4 and 80 I did:

import matplotlib.pyplot as plt
from brokenaxes import brokenaxes

bax=brokenaxes(ylims((0,4),(80,100)))

and got the error

name 'ylims' is not defined

Actually, I had some problems installing the package because it seems to be broken (see my question) therefore I downloaded the brokenaxes.py file from https://github.com/bendichter/brokenaxes. When I open this file in notepad it seemed to me a bit unstructured because line breaks are missing but I could fix that with the help of the github link above. still the error message is the same.

I must confess that I don't understand all scripts in brokenaxes.py but at least I can see that there is a definition of ylims... Anyway I am not sure if I do it wrong or if the packages has a bug

SGeuer
  • 147
  • 1
  • 8

1 Answers1

0

As seen from the documentation the syntax is

bax = brokenaxes(ylims=((0,4),(80,100)))
ImportanceOfBeingErnest
  • 321,279
  • 53
  • 665
  • 712