# Examples <!-- omit from toc -->

Please check out [the documentation](https://docs.rs/plotpy) and the integration tests in the [tests directory](https://github.com/cpmech/plotpy/tree/main/tests)

Some output of integration tests are shown below.

## Contents <!-- omit from toc --> 

- [Barplot](#barplot)
- [Boxplot](#boxplot)
- [Canvas](#canvas)
- [Contour](#contour)
- [Curve](#curve)
- [DarkMode](#darkmode)
- [FillBetween](#fillbetween)
- [Histogram](#histogram)
- [Image](#image)
- [InsetAxes](#insetaxes)
- [Legend](#legend)
- [Plot](#plot)
- [Subplot and GridSpec](#subplot-and-gridspec)
- [Slope icon](#slope-icon)
- [Streamplot and quiver](#streamplot-and-quiver)
- [Surface and wireframe](#surface-and-wireframe)
- [Text](#text)

## Barplot

[test_barplot.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_barplot.rs)

![barplot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_barplot_1.svg)
![barplot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_barplot_2.svg)
![barplot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_barplot_3.svg)
![barplot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_barplot_4.svg)
![barplot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_barplot_5.svg)

## Boxplot

[test_boxplot.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_boxplot.rs)

![boxplot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_boxplot_1.svg)
![boxplot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_boxplot_2.svg)
![boxplot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_boxplot_3.svg)
![boxplot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_boxplot_4.svg)

## Canvas

[test_canvas.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_canvas.rs)

![canvas](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_canvas_draw_triangles_3d.svg)
![canvas](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_canvas_draw_triangles.svg)
![canvas](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_canvas_glyph_3d_and_hide_3d_grid.svg)
![canvas](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_canvas_grid_2d.svg)
![canvas](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_canvas_grid_3d.svg)
![canvas](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_canvas_polycurve_cubic.svg)
![canvas](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_canvas_polycurve_methods.svg)
![canvas](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_canvas_polycurve_quadratic.svg)
![canvas](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_canvas_polyline_3d_methods.svg)
![canvas](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_canvas_polyline_3d.svg)
![canvas](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_canvas_rectangle_and_text.svg)
![canvas](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_canvas_rectangle.svg)
![canvas](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_canvas.svg)

## Contour

[test_contour.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_contour.rs)

![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colorbar_options.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colormap_0.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colormap_1.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colormap_2.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colormap_3.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colormap_4.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colormap_5.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colormap_6.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colormap_7.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colormap_8.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colormap_9.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colormap_gnuplot2.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colormap_Pastel1.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colormap_tab20c.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_colors.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour.svg)
![contour](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_contour_draw_tri.svg)

## Curve

[test_curve.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_curve.rs)

![curve](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_curve_3d.svg)
![curve](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_curve_points_3d_methods.svg)
![curve](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_curve_points_methods.svg)
![curve](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_curve_twinx.svg)
![curve](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_curve.svg)

## DarkMode

[test_dark_mode.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_dark_mode.rs)

![default](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_dark_mode_default.svg)
![mathematica](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_dark_mode_mathematica.svg)
![mocha](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_dark_mode_mocha.svg)
![nordic](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_dark_mode_nordic.svg)

## FillBetween

[test_fill_between.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_fill_between.rs)

![curve](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_fill_between_1.svg)
![curve](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_fill_between_2.svg)
![curve](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_fill_between_3.svg)

## Histogram

[test_histogram.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_histogram.rs)

![histogram](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_histogram_1.svg)
![histogram](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_histogram_2.svg)

## Image

[test_image.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_image.rs)
[test_image_with_rgb.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_image_with_rgb.rs)
[test_image_with_rgba.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_image_with_rgba.rs)

![image](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_image_1.svg)

## InsetAxes

[test_inset_axes.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_inset_axes.rs)

![inset_axes](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_inset_axes_1.svg)
![inset_axes](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_inset_axes_2.svg)
![inset_axes](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_inset_axes_3.svg)
![inset_axes](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_inset_axes_4.svg)
![inset_axes](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_inset_axes_5.svg)
![inset_axes](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_inset_axes_6.svg)
![inset_axes](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_inset_axes_7.svg)


## Legend

[test_legend.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_legend.rs)

![legend](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_legend_1.svg)
![legend](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_legend_2.svg)

## Plot

[test_plot.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_plot.rs)

![plot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_plot_extra_funcionality.svg)
![plot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_plot_fontsize_and_color_2d.svg)
![plot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_plot_fontsize_and_color_3d.svg)
![plot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_plot_handles_quotes.svg)
![plot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_plot_log.svg)
![plot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_plot_multiple_of_pi.svg)
![plot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_plot_subplots.svg)
![plot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_plot_tick_labels.svg)
![plot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_plot_title_handles_tex.svg)
![plot](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_plot.svg)
![plot_3d](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_plot_3d.svg)

## Subplot and GridSpec

[test_subplot.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_subplot.rs)

![gridspec](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_gridspec_1.svg)
![gridspec](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_gridspec_2.svg)

## Slope icon

[test_slope_icon.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_slope_icon.rs)

![slope_icon](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_slope_icon_above.svg)
![slope_icon](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_slope_icon_linx_liny.svg)
![slope_icon](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_slope_icon_logx_logy.svg)
![slope_icon](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_slope_icon_below.svg)
![slope_icon](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_slope_icon_linx_logy.svg)
![slope_icon](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_slope_icon_example.svg)
![slope_icon](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_slope_icon_logx_liny.svg)

## Streamplot and quiver

[test_stream.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_stream.rs)

![streamplot_quiver](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_stream_arrows_1.svg)
![streamplot_quiver](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_stream_arrows_2.svg)

## Surface and wireframe

[test_surface_geometry.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_surface_geometry.rs)

![surface](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_surface_geometry.svg)
![surface](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_surface_cylinder.svg)
![surface](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_surface_superquadric.svg)

[test_surface.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_surface.rs)

![surface](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_surface.svg)
![surface_lines](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_surface_lines.svg)
![wireframe](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_surface_wireframe.svg)
![points](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_surface_points.svg)
![points_color](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_surface_points_color.svg)
![points_void](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_surface_points_void.svg)

[test_subplot_3d.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_subplot_3d.rs)

![subplot_3d](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_subplot_3d.svg)

## Text

[test_text.rs](https://github.com/cpmech/plotpy/tree/main/tests/test_text.rs)

![text](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_text_3d.svg)
![text](https://raw.githubusercontent.com/cpmech/plotpy/main/figures/integ_text.svg)
