Ejemplo n.º 1
0
 def test_quiver(self):
     quiver(x_bounds=[0, 1],
            y_bounds=[0, 1],
            x_custom_tick_locations=[0.2, 0.8],
            y_custom_tick_locations=[0.2, 0.8],
            x_custom_tick_labels=[100, 1000],
            y_custom_tick_labels=[9, -9],
            color_bar=True,
            show=True)
Ejemplo n.º 2
0
    def test_demo(self):

        fig = figure((18, 8), backend=backend)

        ax1 = plt.subplot2grid((2, 6), (0, 0),
                               colspan=2,
                               rowspan=2,
                               projection='3d',
                               facecolor="#fff6e6")
        ax2 = plt.subplot2grid((2, 6), (0, 3), rowspan=1, aspect=1)
        ax3 = plt.subplot2grid((2, 6), (1, 3), rowspan=1, aspect=1)
        ax4 = plt.subplot2grid((2, 6), (0, 5), rowspan=1, aspect=1)
        ax5 = plt.subplot2grid((2, 6), (1, 5), rowspan=1, aspect=1)

        surface(fig=fig,
                ax=ax1,
                title="Demo",
                title_size=70,
                title_weight="bold",
                title_font="Pump Triline",
                title_color="#e69300",
                plot_label="Surface",
                background_color_plot="#fff6e6",
                edge_color="lightgrey",
                edges_to_rgba=True,
                azim=-160,
                elev=43)
        fill_area(fig=fig, ax=ax2, plot_label="Fill", aspect=1, grid=False)
        quiver(fig=fig, ax=ax3, plot_label="Quiver", grid=False)
        heatmap(fig=fig,
                ax=ax4,
                title="No label",
                plot_label="Heatmap",
                grid=False)
        streamline(fig=fig,
                   ax=ax5,
                   line_density=1,
                   title="No label",
                   plot_label="Streamline",
                   grid=False)

        custom_canvas2(fig=fig,
                       ax=ax2,
                       background_color_figure="#fff6e6",
                       legend=True,
                       legend_loc=(0.6725, 0.425),
                       resize_axes=False)

        if show:
            plt.show()
Ejemplo n.º 3
0
    def test_two_d(self):
        from mpl_plotter.two_d import line, scatter, heatmap, quiver, streamline, fill_area

        line(show=show, backend=backend)

        scatter(show=show, backend=backend)

        heatmap(show=show, backend=backend)

        quiver(show=show, backend=backend)

        streamline(show=show, backend=backend)

        fill_area(show=show, backend=backend)

        # Input
        x = np.linspace(0, 2 * np.pi, 100)
        y = np.sin(x)
        line(x=x, y=y, show=show, backend=backend, aspect=1)
Ejemplo n.º 4
0
    def test_two_d(self):
        from mpl_plotter.two_d import line, scatter, heatmap, quiver, streamline, fill_area

        line(show=True)

        scatter(show=True)

        heatmap(show=True)

        quiver(show=True)

        streamline(show=True)

        fill_area(show=True)

        # Input
        x = np.linspace(0, 2 * np.pi, 100)
        y = np.sin(x)
        line(x=x, y=y, show=True)