Skip to content
  • Jameson Graef Rollins's avatar
    CLI support systems with no display · 7799b43c
    Jameson Graef Rollins authored
    matplotlib.pyplot throws a RuntimeError when no display is present.  One
    way around that is to set the backend to AGG.  But we don't want AGG when
    we do have a display.  So we only want to set it opportunistically.  But
    it also has to be set before anything else is imported.  Kind of convoluted.
    
    So we really just import pyplot as opportunistically as possible, and then
    rely on setting AGG backend when we're sure we don't need it in main().
    7799b43c