Example #1
0
    def asiuhd21412sada():
        use_monochrome_style()
        fig, ax = pyplot.subplots(1, 1)

        for x in range(3):
            ax.plot(numpy.random.rand(10), label=f"{x}")

        legend()
        from draugr.visualisation.matplotlib_utilities.quirks import fix_edge_gridlines

        fix_edge_gridlines(ax)
        pyplot.show()
Example #2
0
    def asiuhda():
        use_monochrome_style()
        bar_styles = monochrome_hatch_cycler()
        fig, ax = pyplot.subplots(1, 1)

        for x in range(3):
            ax.bar(x, numpy.random.randint(2, 10), **next(bar_styles), label=f"{x}")

        legend()
        from draugr.visualisation.matplotlib_utilities.quirks import fix_edge_gridlines

        fix_edge_gridlines(ax)
        pyplot.show()
Example #3
0
    def asiuh214da():
        pyplot.style.use(Path(__file__).parent / "styles" / "monochrome.mplstyle")
        line_styles = monochrome_line_cycler()
        fig, ax = pyplot.subplots(1, 1)

        for x in range(3):
            ax.plot(numpy.random.rand(10), **next(line_styles), label=f"{x}")

        legend()
        from draugr.visualisation.matplotlib_utilities.quirks import fix_edge_gridlines

        fix_edge_gridlines(ax)
        pyplot.show()
Example #4
0
def bar_plot():
    use_monochrome_style(prop_cycler=monochrome_hatch_cycler)

    fig, ax = pyplot.subplots(1, 1)

    for x in range(3):
        ax.bar(x, numpy.random.randint(2, 10), label=f"{x}")

    legend()
    from draugr.visualisation.matplotlib_utilities.quirks import fix_edge_gridlines

    fix_edge_gridlines(ax)
    auto_post_hatch(ax, simple_hatch_cycler)
    pyplot.show()
Example #5
0
 def __exit__(self, exc_type, exc_val, exc_tb):
     fix_edge_gridlines(pyplot.gca())
     # pyplot.tight_layout()
     # auto_post_hatch(pyplot.gca(),hatch_cycler)
     self.ctx.__exit__(exc_type, exc_val, exc_tb)