Skip to content
  • Anton Akhmerov's avatar
    if we intend to use pyplot, use it also to create figures · 90f212e6
    Anton Akhmerov authored
    Closes #207.
    
    pyplot "attaches" a figure to a backend on calling pyplot.figure. Previously we
    implemented a hack that worked around this limitation in case the user did not
    import pyplot. However this hack is fragile and breaks new things with newer
    matplotlib versions. Now we detect whether the figure is intended for pyplot
    and import pyplot directly if it is.
    
    This change also allows us to simplify the interface and the implementation of
    output_fig, but this is permitted because it is an internal function.
    90f212e6