Coder Social home page Coder Social logo

alandefreitas / matplotplusplus Goto Github PK

View Code? Open in Web Editor NEW
3.9K 75.0 300.0 39.19 MB

Matplot++: A C++ Graphics Library for Data Visualization 📊🗾

Home Page: https://alandefreitas.github.io/matplotplusplus/

License: MIT License

CMake 0.28% C++ 99.71% C 0.01%
plot-categories data-visualization contour-plots polar-plots matplot data-analysis charts charting-library graphics data-science

matplotplusplus's Introduction

Matplot++

A C++ Graphics Library for Data Visualization

Matplot++


Data visualization can help programmers and scientists identify trends in their data and efficiently communicate these results with their peers. Modern C++ is being used for a variety of scientific applications, and this environment can benefit considerably from graphics libraries that attend the typical design goals toward scientific data visualization. Besides the option of exporting results to other environments, the customary alternatives in C++ are either non-dedicated libraries that depend on existing user interfaces or bindings to other languages. Matplot++ is a graphics library for data visualization that provides interactive plotting, means for exporting plots in high-quality formats for scientific publications, a compact syntax consistent with similar libraries, dozens of plot categories with specialized algorithms, multiple coding styles, and supports generic backends.


Latest Release Documentation Discussions


Facebook QZone Weibo Reddit Twitter LinkedIn WhatsApp Line.me Telegram.me HackerNews


Table of Contents

Gallery

example_plot_1 example_plot3_1 example_stairs_1 example_errorbar_1 example_area_1 example_loglog_1 example_fplot_1 example_fimplicit_1 example_histogram_1 example_boxplot_1 example_scatter_1 example_scatter3_1 example_binscatter_1 example_plotmatrix_1 example_parallelplot_1 example_pie_1 example_heatmap_1 example_wordcloud_1 example_bar_1 example_pareto_1 example_stem_1 example_stem3_1 example_geoplot_1 example_geoscatter_1 example_geobubble_1 example_geodensityplot_1 example_polarplot_1 example_polarscatter_1 example_polarhistogram_1 example_compass_1 example_ezpolar_1 example_contour_1 example_contourf_1 example_fcontour_1 example_feather_1 example_quiver_1 example_surf_1 example_surfc_1 example_mesh_1 example_meshc_1 example_meshz_1 example_fsurf_1 example_fmesh_1 example_waterfall_1 example_fence_1 example_ribbon_1 example_graph_1 example_digraph_1 example_imshow_1 example_image_1 example_imagesc_1

Complete Gallery

example_plot_1 example_plot_2 example_plot_3 example_plot_4 example_plot_5 example_plot_6 example_plot_7 example_plot_8 example_plot_9 example_plot_10 example_plot_11 example_plot_12 example_plot3_1 example_plot3_2 example_plot3_3 example_plot3_4 example_plot3_5 example_plot3_6 example_plot3_7 example_plot3_8 example_plot3_9 example_plot3_10 example_stairs_1 example_stairs_2 example_stairs_3 example_stairs_4 example_stairs_5 example_stairs_6 example_stairs_7 example_stairs_8 example_stairs_9 example_stairs_10 example_errorbar_1 example_errorbar_2 example_errorbar_3 example_errorbar_4 example_errorbar_5 example_errorbar_6 example_errorbar_7 example_errorbar_8 example_errorbar_9 example_errorbar_10 example_area_1 example_area_2 example_area_3 example_area_4 example_loglog_1 example_loglog_2 example_loglog_3 example_loglog_4 example_loglog_5 example_loglog_6 example_loglog_7 example_loglog_8 example_loglog_9 example_semilogx_1 example_semilogy_1 example_fplot_1 example_fplot_2 example_fplot_3 example_fplot_4 example_fplot_5 example_fplot_6 example_fplot3_1 example_fplot3_2 example_fplot3_3 example_fplot3_4 example_fplot3_5 example_fimplicit_1 example_fimplicit_2 example_fimplicit_3 example_fimplicit_4 example_histogram_1 example_histogram_2 example_histogram_3 example_histogram_4 example_histogram_5 example_histogram_6 example_histogram_7 example_histogram_8 example_histogram_9 example_histogram_10 example_histogram_11 example_histogram_12 example_histogram_14 example_boxplot_1 example_boxplot_2 example_boxplot_3 example_scatter_1 example_scatter_2 example_scatter_3 example_scatter_4 example_scatter_5 example_scatter_6 example_scatter_7 example_scatter_8 example_scatter3_1 example_scatter3_2 example_scatter3_3 example_scatter3_4 example_scatter3_5 example_scatter3_6 example_binscatter_1 example_binscatter_2 example_binscatter_3 example_binscatter_4 example_binscatter_5 example_binscatter_6 example_binscatter_7 example_plotmatrix_1 example_plotmatrix_2 example_plotmatrix_3 example_plotmatrix_4 example_parallelplot_1 example_parallelplot_2 example_parallelplot_3 example_pie_1 example_pie_2 example_pie_3 example_pie_4 example_pie_5 example_pie_6 example_heatmap_1 example_heatmap_2 example_heatmap_3 example_heatmap_4 example_heatmap_5 example_heatmap_6 example_heatmap_7 example_wordcloud_1 example_wordcloud_3 example_wordcloud_4 example_wordcloud_4 example_bar_1 example_bar_2 example_bar_3 example_bar_4 example_bar_5 example_bar_6 example_bar_7 example_bar_8 example_bar_9 example_bar_10 example_bar_11 example_bar_12 example_bar_13 example_pareto_1 example_pareto_2 example_pareto_3 example_pareto_4 example_stem_1 example_stem_2 example_stem_3 example_stem_4 example_stem_5 example_stem_6 example_stem_7 example_stem_8 example_stem_9 example_stem3_1 example_stem3_2 example_stem3_3 example_stem3_4 example_stem3_5 example_stem3_6 example_stem3_7 example_stem3_8 example_stem3_9 example_stem3_10 example_stem3_11 example_geoplot_1 example_geoplot_2 example_geoplot_3 example_geoplot_4 example_geoplot_5 example_geoplot_6 example_geoplot_7 example_geoscatter_1 example_geoscatter_2 example_geobubble_1 example_geobubble_2 example_geodensityplot_1 example_polarplot_1 example_polarplot_2 example_polarplot_3 example_polarplot_4 example_polarplot_5 example_polarplot_6 example_polarplot_7 example_polarplot_8 example_polarscatter_1 example_polarscatter_2 example_polarscatter_3 example_polarscatter_4 example_polarscatter_5 example_polarscatter_6 example_polarhistogram_1 example_polarhistogram_2 example_polarhistogram_3 example_polarhistogram_4 example_polarhistogram_5 example_compass_1 example_compass_2 example_ezpolar_1 example_ezpolar_2 example_contour_1 example_contour_2 example_contour_3 example_contour_4 example_contour_5 example_contour_6 example_contour_7 example_contour_8 example_contourf_1 example_contourf_2 example_contourf_3 example_contourf_4 example_contourf_5 example_contourf_6 example_fcontour_1 example_fcontour_2 example_fcontour_3 example_fcontour_4 example_fcontour_5 example_fcontour_6 example_fcontour_7 example_fcontour_8 example_fcontour_9 example_fcontour_10 example_fcontour_11 example_feather_1 example_quiver_1 example_quiver_2 example_quiver_3 example_quiver_4 example_quiver_5 example_quiver_6 example_quiver3_1 example_quiver3_2 example_surf_1 example_surf_2 example_surf_3 example_surf_4 example_surf_5 example_surf_6 example_surfc_1 example_surfc_2 example_surfc_3 example_surfc_4 example_mesh_1 example_mesh_2 example_mesh_3 example_mesh_4 example_meshc_1 example_meshc_2 example_meshc_3 example_meshz_1 example_meshz_2 example_meshz_3 example_fsurf_1 example_fsurf_2 example_fsurf_3 example_fsurf_4 example_fsurf_5 example_fsurf_6 example_fsurf_7 example_fsurf_8 example_fmesh_1 example_fmesh_2 example_fmesh_3 example_fmesh_4 example_waterfall_1 example_waterfall_2 example_waterfall_3 example_fence_1 example_fence_2 example_fence_3 example_ribbon_1 example_ribbon_2 example_ribbon_3 example_ribbon_4 example_graph_1 example_graph_2 example_graph_3 example_graph_4 example_graph_5 example_graph_6 example_digraph_1 example_digraph_2 example_digraph_3 example_imshow_1 example_imshow_2 example_imshow_3 example_imshow_4 example_imshow_5 example_imshow_6 example_imshow_7 example_imshow_8 example_imshow_9 example_imshow_10 example_imshow_11 example_image_1 example_image_2 example_image_3 example_image_4 example_image_5 example_imagesc_1 example_imagesc_2 example_imagesc_3 example_imagesc_4 example_text_1 example_text_2 example_text_3 example_text_4 example_text_5 example_text_6 example_text_7 example_text_8 example_textarrow_1 example_textarrow_2 example_rectangle_1 example_rectangle_2 example_rectangle_3 example_rectangle_4 example_rectangle_5 example_fill_1 example_ellipse_1 example_textbox_1 example_arrow_1 example_arrow_2 example_line_1 example_title_1 example_title_2 example_title_3 example_title_4 example_title_5 example_title_6 example_title_7 example_title_8 example_sgtitle_1 example_sgtitle_2 example_xlabel_1 example_xlabel_2 example_xlabel_3 example_xlabel_4 example_xlabel_5 example_xlabel_6 example_xlabel_7 example_xlabel_8 example_ylabel_1 example_ylabel_2 example_ylabel_3 example_ylabel_4 example_ylabel_5 example_ylabel_6 example_ylabel_7 example_ylabel_8 example_zlabel_1 example_zlabel_2 example_zlabel_3 example_legend_1 example_legend_2 example_legend_3 example_legend_4 example_legend_5 example_legend_6 example_legend_7 example_legend_8 example_legend_9 example_xlim_1 example_xlim_2 example_xlim_3 example_xlim_4 example_xlim_5 example_xlim_6 example_ylim_1 example_ylim_2 example_ylim_3 example_ylim_4 example_ylim_5 example_ylim_6 example_zlim_1 example_zlim_2 example_zlim_3 example_zlim_4 example_zlim_5 example_zlim_6 example_axis_1 example_axis_2 example_axis_3 example_axis_4 example_axis_5 example_axis_6 example_axis_7 example_axis_8 example_box_1 example_box_2 example_box_3 example_grid_1 example_grid_2 example_grid_3 example_grid_4 example_xticks_1 example_xticks_2 example_xticks_3 example_xticks_4 example_xticks_5 example_xticks_6 example_xticks_7 example_xticks_8 example_yticks_1 example_yticks_2 example_yticks_3 example_yticks_4 example_yticks_5 example_yticks_6 example_yticks_7 example_yticks_8 example_zticks_1 example_zticks_2 example_zticks_3 example_zticks_4 example_zticks_5 example_zticks_6 example_xticklabels_1 example_xticklabels_2 example_xticklabels_3 example_xticklabels_4 example_yticklabels_1 example_yticklabels_2 example_yticklabels_3 example_yticklabels_4 example_xtickformat_1 example_xtickformat_2 example_xtickformat_3 example_xtickformat_4 example_xtickformat_5 example_ytickformat_1 example_ytickformat_2 example_ytickformat_3 example_ytickformat_4 example_ytickformat_5 example_ztickformat_1 example_ztickformat_2 example_ztickformat_3 example_ztickformat_4 example_ztickformat_5 example_xtickangle_1 example_xtickangle_2 example_xtickangle_3 example_ytickangle_1 example_ytickangle_2 example_ytickangle_3 example_hold_1 example_hold_2 example_hold_3 example_hold_4 example_yyaxis_1 example_yyaxis_2 example_yyaxis_3 example_yyaxis_4 example_yyaxis_5 example_yyaxis_6 example_yyaxis_7 example_colororder_1 example_colororder_2 example_colororder_3 example_colororder_4 example_colororder_5 example_colororder_6 example_colororder_7 example_subplot_1 example_subplot_2 example_subplot_3 example_subplot_4 example_subplot_5 example_subplot_6 example_subplot_7 example_subplot_8 example_subplot_9 example_subplot_10 example_subplot_11 example_subplot_12 example_subplot_13 example_tiledlayout_1 example_tiledlayout_2 example_tiledlayout_3 example_tiledlayout_4 example_tiledlayout_5 example_tiledlayout_6 example_tiledlayout_7 example_tiledlayout_8 example_colormap_1 example_colormap_2 example_colormap_3 example_colormap_4 example_colormap_5 example_colormap_6 example_colormap_7 example_colormap_8 example_colormap_9 example_colorbar_1 example_colorbar_2 example_colorbar_3 example_colorbar_4 example_colorbar_5 example_colorbar_6 example_colorbar_7 example_rgbplot_1 example_rgbplot_2 example_view_1 example_view_2 example_view_3 example_view_4 example_view_5 example_view_6 example_lighting_1 example_lighting_2 example_lighting_3 example_lighting_4 example_lighting_5 example_lighting_6 example_figure_1 example_figure_2 example_figure_3 example_line_spec_1 example_axes_1 example_axes_2 example_axes_3 example_axes_4 example_cla_1 example_cla_2 example_cla_3 example_save_1 example_save_2 example_save_3 example_save_4 example_save_5 example_save_6 example_save_7 example_save_8

Integration

Package Managers

Vcpkg

Vcpkg users can install Matplot++ with the matplotplusplus port:

vcpkg install matplotplusplus

This formula is a contribution to vcpkg by @myd7349.

Homebrew

Mac users can install Matplot++ with Homebrew:

brew install matplotplusplus

This formula is a contribution to Homebrew by Andrew Kane.

Arch Linux

Matplot++ is available in the Arch User Repository (AUR) as matplotplusplus.

Note you can manually install the package by following the instructions on the Arch Wiki or use an AUR helper like yay (recommended for ease of install).

yay -S matplotplusplus

To discuss any issues related to this package refer to the comments section on the AUR page of matplotplusplus here.

CMake

Embed as Subdirectory

You can use Matplot++ directly in CMake projects as a subproject, without installing it. This is convenient if you are experimenting with this library for the first time or don't expect your users to have Matplot++ installed on their systems.

Check if you have Cmake 3.14+ installed:

cmake --version

Clone the whole project

git clone https://github.com/alandefreitas/matplotplusplus/

and add the subdirectory to your CMake project:

add_subdirectory(matplotplusplus)

When creating your executable, link the library to the targets you want:

add_executable(my_target main.cpp)
target_link_libraries(my_target PUBLIC matplot)

Add this header to your source files:

#include <matplot/matplot.h>

However, in larger projects, it's always recommended to look for Matplot++ with find_package before including it as a subdirectory to avoid ODR errors.

Install as a Package via CMake

If you have CMake 3.21 or greater, you can use the system build preset to build the package system-wide:

cmake --preset=system
cmake --build --preset=system
sudo cmake --install build/system

Alternatively, if the CMAKE_PREFIX_PATH environment variable is set to $HOME/.local, then you can install it locally. This can be set in /etc/profile or your shell config. This will not affect discovery of packages installed system-wide.

export CMAKE_PREFIX_PATH="$HOME/.local"

This has the advantage of not requiring sudo, and matplotplusplus will be installed in $HOME/.local.

cmake --preset=local
cmake --build --preset=local
cmake --install build/local

You can now use it from CMake with find_package:

find_package(Matplot++ REQUIRED)

target_link_libraries(<your target> Matplot++::matplot)

If you're using a version of CMake too old to support presets, then building with the system preset is equivilant to:

cmake -B build/system         \
    -DMATPLOTPP_BUILD_EXAMPLES=OFF      \
    -DMATPLOTPP_BUILD_SHARED_LIBS=ON    \
    -DMATPLOTPP_BUILD_TESTS=OFF         \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON

cmake --build build/system

While building with the local preset is equivilant to:

cmake -B build/local                      \
    -DMATPLOTPP_BUILD_EXAMPLES=OFF                  \
    -DMATPLOTPP_BUILD_SHARED_LIBS=ON                \
    -DMATPLOTPP_BUILD_TESTS=OFF                     \
    -DCMAKE_BUILD_TYPE=Release            \
    -DCMAKE_INSTALL_PREFIX="$HOME/.local" \
    -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON

cmake --build build/local

Embed with Automatic Download

FetchContent is a CMake command that can automatically download the Matplot++ repository. Check if you have Cmake 3.14+ installed:

cmake --version

Include FetchContent in your CMake build script:

include(FetchContent)

Declare the source for the contents:

FetchContent_Declare(matplotplusplus
        GIT_REPOSITORY https://github.com/alandefreitas/matplotplusplus
        GIT_TAG origin/master) # or whatever tag you want

Let CMake download the repository and include it as a subdirectory.

FetchContent_GetProperties(matplotplusplus)
if(NOT matplotplusplus_POPULATED)
    FetchContent_Populate(matplotplusplus)
    add_subdirectory(${matplotplusplus_SOURCE_DIR} ${matplotplusplus_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()

When creating your executable, link the library to the targets you want:

add_executable(my_target main.cpp)
target_link_libraries(my_target PUBLIC matplot)

Then add this header to your source files:

#include <matplot/matplot.h>

However, in larger projects, it's always recommended to look for Matplot++ with find_package before including it as a subdirectory to avoid ODR errors.

Embed with CPM.cmake

CPM.cmake is a nice wrapper around the CMake FetchContent function.

Check if you have Cmake 3.14+ installed:

cmake --version

Install CPM.cmake and then use this command to add Matplot++ to your build script:

CPMAddPackage(
    NAME matplotplusplus
    GITHUB_REPOSITORY alandefreitas/matplotplusplus
    GIT_TAG origin/master # or whatever tag you want
)
# ...
target_link_libraries(my_target PUBLIC matplot)

Then add this header to your source files:

#include <matplot/matplot.h>

However, in larger projects, it's always recommended to look for Matplot++ with find_package before including it as a subdirectory to avoid ODR errors.

You can use:

option(CPM_USE_LOCAL_PACKAGES "Try `find_package` before downloading dependencies" ON)

in your build script to let CPM.cmake do that for you.

Find as External Package

If you have the library installed on your system, you can call find_package() from your CMake build script.

find_package(Matplot++ REQUIRED)

When creating your executable, link the library to the targets you want:

add_executable(my_target main.cpp)
target_link_libraries(my_target PUBLIC Matplot++::matplot)

Then add this header to your source files:

#include <matplot/matplot.h>

You can see a complete example in test/integration/CMakeLists.txt.

CMake should be able to locate the Matplot++Config.cmake script automatically if you installed the library under /usr/local/ (Linux / Mac OS). Unfortunately, there is no easy default directory for find_package on Windows.

!!! warning "Default directories"

By default, the library is likely to be in `/usr/local/` (Linux / Mac OS) or `C:/Program Files/` (Windows). The installer will try to find the directory where you usually keep your libraries but that's not always perfect.

!!! warning "Finding packages on Windows"

Unfortunately, CMake does not have a single default directory for packages on Windows like `/usr/local/lib`. If CMake cannot find Matplot++ on Windows or if you installed the library outside the default directory on Linux/Mac OS, there are a few [options](https://stackoverflow.com/questions/21314893/what-is-the-default-search-path-for-find-package-in-windows-using-cmake):

* **Environment Variables**: The most reliable way to set this default directory is through environment variables. You can create an environment variable `MATPLOTPP_DIR` and then add `$ENV{MATPLOTPP_DIR}` to the `HINTS` section of the `find_package` command. This tends to be more convenient than requiring the path on the command line every time. Starting with version 3.12, CMake now implicitly considers the `<PackageName>_Root` environment variable a HINT for every `find_package` call.
* **Package Registry**: CMake offers the [Package Registry](https://cmake.org/cmake/help/v3.5/manual/cmake-packages.7.html#package-registry) as an alternative mechanism for finding package locations. CMake maintains a list of package information in the Windows registry under `HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\`.
* **Append CMAKE_MODULE_PATH**: You can append more directories to [`CMAKE_MODULE_PATH`](https://cmake.org/cmake/help/latest/variable/CMAKE_MODULE_PATH.html) with something like `list(APPEND CMAKE_MODULE_PATH "C:\\Program Files\\matplotplusplus 1.0.1")`. `CMAKE_MODULE_PATH` is a list of search paths for CMake modules to be loaded by the `include()` or `find_package()` commands.
* **Set the DIR variable directly**: Directly set the `Matplot++_DIR` variable with something like `set(Matplot++_DIR "C:\\Program Files\\matplotplusplus 1.0.1\\lib\\cmake\\Matplot++")`. This might be good enough for small local projects but it is hard-coding the directory in your build script. When your library gets out of your local environment, you need to choose one of the other options above (better) or make this variable an option and require the user to provide the directory on the command line every time (worse).

Supporting Both

It's often useful to let your build script download Matplot++ when find_package fails. If using CPM.cmake, you can set the CPM_USE_LOCAL_PACKAGES option to try to find_package(Matplot++) before download Matplot++.

If using FetchContent, you can use the following pattern:

find_package(Matplot++ QUIET)
if(NOT Matplot++_FOUND)
    # Put your FetchContent or CPM.cmake script here
endif()

Install

Binary Packages

Get the binary package from the release section. These binaries refer to the last release version of Matplot++.

If you need a more recent version of Matplot++, you can download the binary packages from the CI artifacts or build the library from the source files.

Build from Source

Dependencies

C++17

Make sure your C++ compiler supports C++17:

=== "Ubuntu + GCC"

```bash
g++ --version
```

=== "Mac Os + Clang"

```bash
clang --version
```

=== "Windows + MSVC"

!!! warning ""
    * Visit the [Visual Studio](https://visualstudio.microsoft.com) website
    * Download Git from [https://git-scm.com/download/win](https://git-scm.com/download/win) and install it

The output should be something like:

=== "Ubuntu + GCC"

```console
g++-8 (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0
```

=== "Mac Os + Clang"

```console
Apple clang version 11.0.0 (clang-1100.0.33.8)
```

=== "Windows + MSVC"

!!! warning ""
    * Visit the [Visual Studio](https://visualstudio.microsoft.com) website
    * Download Git from [https://git-scm.com/download/win](https://git-scm.com/download/win) and install it

If you need to update your compiler:

=== "Ubuntu + GCC"

```bash
# install GCC-8
sudo apt update
sudo apt install gcc-8
sudo apt install g++-8
```

To update to any other version, like GCC-9 or GCC-10:

```bash
sudo apt install build-essential
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt install g++-10
```

Once you installed a newer version of GCC, you can link it to `update-alternatives`. For instance, if you have GCC-7 and GCC-10, you can link them with:

```bash
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 7
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
```

You can now use `update-alternatives` to set your default `gcc` and `g++` to a more recent version:

```bash
update-alternatives --config g++
update-alternatives --config gcc
```

=== "Mac Os + Clang"

```bash
# download clang
curl --output clang.tar.xz -L https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/clang+llvm-11.0.0-x86_64-apple-darwin.tar.xz
mkdir clang
tar -xvJf clang.tar.xz -C clang

# copy files to /usr/local
cd clang/clang+llvm-11.0.0-x86_64-apple-darwin
sudo cp -R * /usr/local/

# update default compiler
export CXX=/usr/local/bin/clang++
```

=== "Windows + MSVC"

!!! warning ""
    * Visit the [Visual Studio](https://visualstudio.microsoft.com) website
    * Download Git from [https://git-scm.com/download/win](https://git-scm.com/download/win) and install it

CMake 3.14+

Also check your CMake version is at least 3.14+:

=== "Ubuntu + GCC"

```bash
cmake --version
```

=== "Mac Os + Clang"

```bash
cmake --version
```

=== "Windows + MSVC"

```bash
cmake --version
```

If CMake is not installed or its version is older than CMake 3.14, update it with

=== "Ubuntu + GCC"

```bash
sudo apt upgrade cmake
```

!!! warning ""
    Alternatively, download the most recent version from [cmake.org](https://cmake.org/).

=== "Mac Os + Clang"

```bash
brew upgrade cmake
```

!!! warning "Homebrew"
    If this command fails because you don't have [Homebrew](https://brew.sh) on your computer, you can install it with

    ```bash
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
    ```

    or you can follow the instructions in [https://brew.sh](https://brew.sh).


!!! warning ""
    Alternatively, download the most recent version from [cmake.org](https://cmake.org/).

=== "Windows + MSVC"

!!! warning ""
    Download the most recent version from [cmake.org](https://cmake.org/).

Gnuplot 5.2.6+

Install Gnuplot 5.2.6+ (Required at runtime)

=== "Ubuntu + GCC"

```bash
sudo apt update
sudo apt install gnuplot
```

!!! note ""
    Or download the latest version from [www.gnuplot.info](http://www.gnuplot.info). If you're using an installer, make sure you mark the option "Add application directory to your PATH environment variable".

=== "Mac Os + Clang"

```bash
brew install gnuplot
```

!!! note ""
    Or download the latest version from [www.gnuplot.info](http://www.gnuplot.info). If you're using an installer, make sure you mark the option "Add application directory to your PATH environment variable".

=== "Windows + MSVC"

!!! warning ""
    Download Gnuplot from [www.gnuplot.info](http://www.gnuplot.info) and install it.

    If you're using the Gnuplot installer, make sure you mark the option "Add application directory to your PATH environment variable"

!!! warning "Windows Gnuplot Terminals"

    If the Matplot++ examples don't display without console errors and gnuplot running, try to re-install Gnuplot with the wxt terminal.

Optional Dependencies

The build script will also look for these optional dependencies for manipulating images:

  • JPEG
  • TIFF
  • ZLIB
  • PNG
  • LAPACK
  • BLAS
  • FFTW
  • OpenCV

Embedded Dependencies

There are two dependencies in source/3rd_party. These dependencies are bundled, so you don't have to worry about them:

  • olvb/nodesoup
  • dtschump/CImg

You can define MATPLOTPP_WITH_SYSTEM_NODESOUP=ON or MATPLOTPP_WITH_SYSTEM_CIMG=ON in the cmake command line to use a system-provided version of these dependencies.

OpenGL Dependencies

There's an extra target matplot_opengl with the experimental OpenGL backend. You need to define MATPLOTPP_BUILD_EXPERIMENTAL_OPENGL_BACKEND=ON in the CMake command line to build that target. In that case, the build script will also look for these extra dependencies:

  • OpenGL
  • GLAD
  • GLFW3

If these dependencies are not found, the build script will download them. In any case, you can install these dependencies with:

=== "Ubuntu + GCC"

```bash
sudo apt-get install libglfw3-dev
```

=== "Mac Os + Clang"

!!! note ""
    Download GLFW3 from https://www.glfw.org

=== "Windows + MSVC"

!!! note ""
    Download GLFW3 from https://www.glfw.org

You can also see all dependencies in source/3rd_party/CMakeLists.txt.

Build and Install

Building Examples

This will build the examples in the build/examples directory:

=== "Ubuntu + GCC"

```bash
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-O2"
sudo cmake --build . --parallel 2 --config Release
```

=== "Mac Os + Clang"

```bash
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-O2"
cmake --build . --parallel 2 --config Release
```

=== "Windows + MSVC"

```bash
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="/O2"
cmake --build . --parallel 2 --config Release
```

!!! hint "Parallel Build" Replace --parallel 2 with --parallel <number of cores in your machine>

!!! note "Setting C++ Compiler"

If your C++ compiler that supports C++17 is not your default compiler, make sure you provide CMake with the compiler location with the DCMAKE_C_COMPILER and DCMAKE_CXX_COMPILER options. For instance:

```bash
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-O2" -DCMAKE_C_COMPILER=/usr/bin/gcc-8 -DCMAKE_CXX_COMPILER=/usr/bin/g++-8
```

Installing

You can 1) use -DMATPLOTPP_BUILD_EXAMPLES=OFF -DMATPLOTPP_BUILD_TESTS=OFF to bypass the examples and tests, and then 2) cmake --install . to install Matplot++ on your system:

=== "Ubuntu + GCC"

```bash
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-O2" -DMATPLOTPP_BUILD_EXAMPLES=OFF -DMATPLOTPP_BUILD_TESTS=OFF
sudo cmake --build . --parallel 2 --config Release
sudo cmake --install .
```

=== "Mac Os + Clang"

```bash
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-O2" -DMATPLOTPP_BUILD_EXAMPLES=OFF -DMATPLOTPP_BUILD_TESTS=OFF
cmake --build . --parallel 2 --config Release
cmake --install .
```

=== "Windows + MSVC"

```bash
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="/O2" -DMATPLOTPP_BUILD_EXAMPLES=OFF -DMATPLOTPP_BUILD_TESTS=OFF
cmake --build . --parallel 2 --config Release
cmake --install .
```

!!! hint "Parallel Build" Replace --parallel 2 with --parallel <number of cores in your machine>

Create Packages

You can also create the binary packages to install Matplot++ on other systems:

=== "Ubuntu + GCC"

```bash
sudo cpack .
```

=== "Mac Os + Clang"

```bash
cpack .
```

=== "Windows + MSVC"

```bash
cpack .
```

Plot Types

Line Plots

Line Plot | Line Plot 3D | Stairs | Error Bars | Area | Loglog Plot | Semilogx Plot | Semilogy Plot | Function Plot | Function Plot 3D | Implicit function

Line Plot

!!! tip Use these examples to understand how to quickly use the library for data visualization. If you are interested in understanding how the library works, you can later read the details in the complete article.

plot(x,y);

Where x and y are are any value ranges.

=== "Plot"

[![example_plot_1](docs/examples/line_plot/plot/plot_1.svg)](examples/line_plot/plot/plot_1.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot/plot_1.cpp"
```
More examples

example_plot_2 example_plot_3 example_plot_4 example_plot_5 example_plot_6 example_plot_7 example_plot_8 example_plot_9 example_plot_10 example_plot_11 example_plot_12

!!! tip Setters return a reference to *this to allow method chaining:

```cpp
plot(x,y)->line_width(2).color("red");
```

!!! tip These examples use free-standing functions to create plots. You can also use a object-oriented style for plots. We discuss these coding styles in the Section Coding Styles.

More Examples:

===! "Plot"

[![example_plot_2](docs/examples/line_plot/plot/plot_2.svg)](examples/line_plot/plot/plot_2.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot/plot_2.cpp"
```

===! "Plot"

[![example_plot_3](docs/examples/line_plot/plot/plot_3.svg)](examples/line_plot/plot/plot_3.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot/plot_3.cpp"
```

===! "Plot"

[![example_plot_4](docs/examples/line_plot/plot/plot_4.svg)](examples/line_plot/plot/plot_4.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot/plot_4.cpp"
```

===! "Plot"

[![example_plot_5](docs/examples/line_plot/plot/plot_5.svg)](examples/line_plot/plot/plot_5.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot/plot_5.cpp"
```

===! "Plot"

[![example_plot_6](docs/examples/line_plot/plot/plot_6.svg)](examples/line_plot/plot/plot_6.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot/plot_6.cpp"
```

===! "Plot"

[![example_plot_7](docs/examples/line_plot/plot/plot_7.svg)](examples/line_plot/plot/plot_7.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot/plot_7.cpp"
```

===! "Plot"

[![example_plot_8](docs/examples/line_plot/plot/plot_8.svg)](examples/line_plot/plot/plot_8.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot/plot_8.cpp"
```

===! "Plot"

[![example_plot_9](docs/examples/line_plot/plot/plot_9.svg)](examples/line_plot/plot/plot_9.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot/plot_9.cpp"
```

===! "Plot"

[![example_plot_10](docs/examples/line_plot/plot/plot_10.svg)](examples/line_plot/plot/plot_10.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot/plot_10.cpp"
```

===! "Plot"

[![example_plot_11](docs/examples/line_plot/plot/plot_11.svg)](examples/line_plot/plot/plot_11.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot/plot_11.cpp"
```

===! "Plot"

[![example_plot_12](docs/examples/line_plot/plot/plot_12.svg)](examples/line_plot/plot/plot_12.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot/plot_12.cpp"
```

Line Plot 3D

plot3(x,y);

=== "Plot"

[![example_plot3_1](docs/examples/line_plot/plot3/plot3_1.svg)](examples/line_plot/plot3/plot3_1.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot3/plot3_1.cpp"
```

!!! tip With method chaining:

```cpp
plot3(x,y)->line_width(2).color("red");
```
More examples

example_plot3_2 example_plot3_3 example_plot3_4 example_plot3_5 example_plot3_7 example_plot3_8 example_plot3_9 example_plot3_10

More Examples:

===! "Plot"

[![example_plot3_2](docs/examples/line_plot/plot3/plot3_2.svg)](examples/line_plot/plot3/plot3_2.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot3/plot3_2.cpp"
```

===! "Plot"

[![example_plot3_3](docs/examples/line_plot/plot3/plot3_3.svg)](examples/line_plot/plot3/plot3_3.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot3/plot3_3.cpp"
```

===! "Plot"

[![example_plot3_4](docs/examples/line_plot/plot3/plot3_4.png)](examples/line_plot/plot3/plot3_4.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot3/plot3_4.cpp"
```

===! "Plot"

[![example_plot3_5](docs/examples/line_plot/plot3/plot3_5.svg)](examples/line_plot/plot3/plot3_5.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot3/plot3_5.cpp"
```

===! "Plot"

[![example_plot3_7](docs/examples/line_plot/plot3/plot3_7.svg)](examples/line_plot/plot3/plot3_7.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot3/plot3_7.cpp"
```

===! "Plot"

[![example_plot3_8](docs/examples/line_plot/plot3/plot3_8.svg)](examples/line_plot/plot3/plot3_8.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot3/plot3_8.cpp"
```

===! "Plot"

[![example_plot3_9](docs/examples/line_plot/plot3/plot3_9.svg)](examples/line_plot/plot3/plot3_9.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot3/plot3_9.cpp"
```

===! "Plot"

[![example_plot3_10](docs/examples/line_plot/plot3/plot3_10.svg)](examples/line_plot/plot3/plot3_10.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/plot3/plot3_10.cpp"
```

Stairs

stairs(x,y);

The stair object renders the line with stairs between data points to denote discrete data.

See result

example_stairs_1

More Examples:

example_stairs_2 example_stairs_3 example_stairs_4 example_stairs_5 example_stairs_6 example_stairs_7 example_stairs_8 example_stairs_9 example_stairs_10

===! "Plot"

[![example_stairs_2](docs/examples/line_plot/stairs/stairs_2.svg)](examples/line_plot/stairs/stairs_2.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/stairs/stairs_2.cpp"
```

More Examples:

===! "Plot"

[![example_stairs_3](docs/examples/line_plot/stairs/stairs_3.svg)](examples/line_plot/stairs/stairs_3.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/stairs/stairs_3.cpp"
```

===! "Plot"

[![example_stairs_4](docs/examples/line_plot/stairs/stairs_4.svg)](examples/line_plot/stairs/stairs_4.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/stairs/stairs_4.cpp"
```

===! "Plot"

[![example_stairs_5](docs/examples/line_plot/stairs/stairs_5.svg)](examples/line_plot/stairs/stairs_5.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/stairs/stairs_5.cpp"
```

===! "Plot"

[![example_stairs_6](docs/examples/line_plot/stairs/stairs_6.svg)](examples/line_plot/stairs/stairs_6.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/stairs/stairs_6.cpp"
```

===! "Plot"

[![example_stairs_7](docs/examples/line_plot/stairs/stairs_7.svg)](examples/line_plot/stairs/stairs_7.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/stairs/stairs_7.cpp"
```

===! "Plot"

[![example_stairs_8](docs/examples/line_plot/stairs/stairs_8.svg)](examples/line_plot/stairs/stairs_8.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/stairs/stairs_8.cpp"
```

===! "Plot"

[![example_stairs_9](docs/examples/line_plot/stairs/stairs_9.svg)](examples/line_plot/stairs/stairs_9.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/stairs/stairs_9.cpp"
```

===! "Plot"

[![example_stairs_10](docs/examples/line_plot/stairs/stairs_10.svg)](examples/line_plot/stairs/stairs_10.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/stairs/stairs_10.cpp"
```

Error Bars

errorbar(x,y,err);
See result

example_errorbar_1

More Examples:

example_errorbar_2 example_errorbar_3 example_errorbar_4 example_errorbar_5 example_errorbar_6 example_errorbar_7 example_errorbar_8 example_errorbar_9 example_errorbar_10

===! "Plot"

[![example_errorbar_1](docs/examples/line_plot/errorbar/errorbar_1.svg)](examples/line_plot/errorbar/errorbar_1.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/errorbar/errorbar_1.cpp"
```

More Examples:

===! "Plot"

[![example_errorbar_2](docs/examples/line_plot/errorbar/errorbar_2.svg)](examples/line_plot/errorbar/errorbar_2.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/errorbar/errorbar_2.cpp"
```

===! "Plot"

[![example_errorbar_3](docs/examples/line_plot/errorbar/errorbar_3.svg)](examples/line_plot/errorbar/errorbar_3.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/errorbar/errorbar_3.cpp"
```

===! "Plot"

[![example_errorbar_4](docs/examples/line_plot/errorbar/errorbar_4.svg)](examples/line_plot/errorbar/errorbar_4.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/errorbar/errorbar_4.cpp"
```

===! "Plot"

[![example_errorbar_5](docs/examples/line_plot/errorbar/errorbar_5.svg)](examples/line_plot/errorbar/errorbar_5.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/errorbar/errorbar_5.cpp"
```

===! "Plot"

[![example_errorbar_6](docs/examples/line_plot/errorbar/errorbar_6.svg)](examples/line_plot/errorbar/errorbar_6.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/errorbar/errorbar_6.cpp"
```

===! "Plot"

[![example_errorbar_7](docs/examples/line_plot/errorbar/errorbar_7.svg)](examples/line_plot/errorbar/errorbar_7.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/errorbar/errorbar_7.cpp"
```

===! "Plot"

[![example_errorbar_8](docs/examples/line_plot/errorbar/errorbar_8.svg)](examples/line_plot/errorbar/errorbar_8.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/errorbar/errorbar_8.cpp"
```

===! "Plot"

[![example_errorbar_9](docs/examples/line_plot/errorbar/errorbar_9.svg)](examples/line_plot/errorbar/errorbar_9.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/errorbar/errorbar_9.cpp"
```

===! "Plot"

[![example_errorbar_10](docs/examples/line_plot/errorbar/errorbar_10.svg)](examples/line_plot/errorbar/errorbar_10.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/errorbar/errorbar_10.cpp"
```

The error bar object includes extra lines to represent error around data points. Log plots are utility functions that adjust the x or y axes to a logarithmic scale.

Area

area(Y);
See result

example_area_1

More Examples:

example_area_2 example_area_3 example_area_4

===! "Plot"

[![example_area_1](docs/examples/line_plot/area/area_1.svg)](examples/line_plot/area/area_1.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/area/area_1.cpp"
```

More Examples:

===! "Plot"

[![example_area_2](docs/examples/line_plot/area/area_2.svg)](examples/line_plot/area/area_2.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/area/area_2.cpp"
```

===! "Plot"

[![example_area_3](docs/examples/line_plot/area/area_3.svg)](examples/line_plot/area/area_3.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/area/area_3.cpp"
```

===! "Plot"

[![example_area_4](docs/examples/line_plot/area/area_4.svg)](examples/line_plot/area/area_4.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/area/area_4.cpp"
```

Loglog Plot

loglog(x,y);
See result

example_loglog_1

More Examples:

example_loglog_2 example_loglog_3 example_loglog_4 example_loglog_5 example_loglog_6 example_loglog_7 example_loglog_8 example_loglog_9

===! "Plot"

  [![example_loglog_1](docs/examples/line_plot/loglog/loglog_1.svg)](examples/line_plot/loglog/loglog_1.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/loglog/loglog_1.cpp"
```

More Examples:

===! "Plot"

  [![example_loglog_2](docs/examples/line_plot/loglog/loglog_2.svg)](examples/line_plot/loglog/loglog_2.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/loglog/loglog_2.cpp"
```

===! "Plot"

  [![example_loglog_3](docs/examples/line_plot/loglog/loglog_3.png)](examples/line_plot/loglog/loglog_3.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/loglog/loglog_3.cpp"
```

===! "Plot"

  [![example_loglog_4](docs/examples/line_plot/loglog/loglog_4.svg)](examples/line_plot/loglog/loglog_4.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/loglog/loglog_4.cpp"
```

===! "Plot"

  [![example_loglog_5](docs/examples/line_plot/loglog/loglog_5.png)](examples/line_plot/loglog/loglog_5.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/loglog/loglog_5.cpp"
```

===! "Plot"

  [![example_loglog_6](docs/examples/line_plot/loglog/loglog_6.svg)](examples/line_plot/loglog/loglog_6.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/loglog/loglog_6.cpp"
```

===! "Plot"

  [![example_loglog_7](docs/examples/line_plot/loglog/loglog_7.svg)](examples/line_plot/loglog/loglog_7.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/loglog/loglog_7.cpp"
```

===! "Plot"

  [![example_loglog_8](docs/examples/line_plot/loglog/loglog_8.svg)](examples/line_plot/loglog/loglog_8.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/loglog/loglog_8.cpp"
```

===! "Plot"

  [![example_loglog_9](docs/examples/line_plot/loglog/loglog_9.svg)](examples/line_plot/loglog/loglog_9.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/loglog/loglog_9.cpp"
```

Semilogx Plot

semilogx(x,y);
See result

example_semilogx_1

===! "Plot"

[![example_semilogx_1](docs/examples/line_plot/semilogx/semilogx_1.svg)](examples/line_plot/semilogx/semilogx_1.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/semilogx/semilogx_1.cpp"
```

Semilogy Plot

semilogy(x,y);
See result

example_semilogy_1

===! "Plot"

[![example_semilogy_1](docs/examples/line_plot/semilogy/semilogy_1.svg)](examples/line_plot/semilogy/semilogy_1.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/semilogy/semilogy_1.cpp"
```

Function Plot

fplot(fx);
See result

example_fplot_1

More Examples:

example_fplot_2 example_fplot_3 example_fplot_4 example_fplot_5 example_fplot_6

===! "Plot"

[![example_fplot_1](docs/examples/line_plot/fplot/fplot_1.svg)](examples/line_plot/fplot/fplot_1.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fplot/fplot_1.cpp"
```

More Examples:

===! "Plot"

[![example_fplot_2](docs/examples/line_plot/fplot/fplot_2.svg)](examples/line_plot/fplot/fplot_2.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fplot/fplot_2.cpp"
```

===! "Plot"

[![example_fplot_3](docs/examples/line_plot/fplot/fplot_3.png)](examples/line_plot/fplot/fplot_3.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fplot/fplot_3.cpp"
```

===! "Plot"

[![example_fplot_4](docs/examples/line_plot/fplot/fplot_4.png)](examples/line_plot/fplot/fplot_4.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fplot/fplot_4.cpp"
```

===! "Plot"

[![example_fplot_5](docs/examples/line_plot/fplot/fplot_5.png)](examples/line_plot/fplot/fplot_5.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fplot/fplot_5.cpp"
```

===! "Plot"

[![example_fplot_6](docs/examples/line_plot/fplot/fplot_6.svg)](examples/line_plot/fplot/fplot_6.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fplot/fplot_6.cpp"
```

Instead of storing data points, the objects function line and string function store a function as a lambda function or as a string with an expression. These objects use lazy evaluation to generate absolute data points. The data is generated only when the draw function is called.

Function Plot 3D

fplot(fxy);
See result

example_fplot3_1

More Examples:

example_fplot3_2 example_fplot3_3 example_fplot3_4 example_fplot3_5

===! "Plot"

[![example_fplot3_1](docs/examples/line_plot/fplot3/fplot3_1.svg)](examples/line_plot/fplot3/fplot3_1.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fplot3/fplot3_1.cpp"
`````

More Examples:

===! "Plot"

[![example_fplot3_2](docs/examples/line_plot/fplot3/fplot3_2.svg)](examples/line_plot/fplot3/fplot3_2.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fplot3/fplot3_2.cpp"
```

===! "Plot"

[![example_fplot3_3](docs/examples/line_plot/fplot3/fplot3_3.png)](examples/line_plot/fplot3/fplot3_3.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fplot3/fplot3_3.cpp"
```

===! "Plot"

[![example_fplot3_4](docs/examples/line_plot/fplot3/fplot3_4.svg)](examples/line_plot/fplot3/fplot3_4.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fplot3/fplot3_4.cpp"
```

===! "Plot"

[![example_fplot3_5](docs/examples/line_plot/fplot3/fplot3_5.svg)](examples/line_plot/fplot3/fplot3_5.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fplot3/fplot3_5.cpp"
```

Implicit function

fplot(fxy);
See result

example_fimplicit_1

More Examples:

example_fimplicit_2 example_fimplicit_3 example_fimplicit_4

===! "Plot"

[![example_fimplicit_1](docs/examples/line_plot/fimplicit/fimplicit_1.svg)](examples/line_plot/fimplicit/fimplicit_1.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fimplicit/fimplicit_1.cpp"
```

More Examples:

===! "Plot"

[![example_fimplicit_2](docs/examples/line_plot/fimplicit/fimplicit_2.svg)](examples/line_plot/fimplicit/fimplicit_2.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fimplicit/fimplicit_2.cpp"
```

===! "Plot"

[![example_fimplicit_3](docs/examples/line_plot/fimplicit/fimplicit_3.svg)](examples/line_plot/fimplicit/fimplicit_3.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fimplicit/fimplicit_3.cpp"
```

===! "Plot"

[![example_fimplicit_4](docs/examples/line_plot/fimplicit/fimplicit_4.svg)](examples/line_plot/fimplicit/fimplicit_4.cpp)

=== "C++"

```cpp
--8<-- "examples/line_plot/fimplicit/fimplicit_4.cpp"
```

Data Distribution

Histogram | Boxplot | Scatter Plot | Scatter Plot 3D | Binned Scatter Plots | Plot Matrix | Parallel Coordinates | Pie Chart | Heatmap | Word Cloud

Histogram

The histogram object creates the histogram edges and bins when the draw function is called for the first time with lazy evaluation. Lazy evaluation avoids calculating edges unnecessarily in case the user changes the object parameters before calling draw. This object includes several algorithms for automatically delimiting the edges and bins for the histograms.

hist(data);
See result

example_histogram_1

More Examples:

example_histogram_2 example_histogram_3 example_histogram_4 example_histogram_5 example_histogram_6 example_histogram_7 example_histogram_8 example_histogram_9 example_histogram_10 example_histogram_11 example_histogram_12 example_histogram_14

===! "Plot"

[![example_histogram_1](docs/examples/data_distribution/histogram/histogram_1.png)](examples/data_distribution/histogram/histogram_1.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/histogram/histogram_1.cpp"
```

More Examples:

===! "Plot"

[![example_histogram_2](docs/examples/data_distribution/histogram/histogram_2.png)](examples/data_distribution/histogram/histogram_2.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/histogram/histogram_2.cpp"
```

===! "Plot"

[![example_histogram_3](docs/examples/data_distribution/histogram/histogram_3.png)](examples/data_distribution/histogram/histogram_3.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/histogram/histogram_3.cpp"
```

===! "Plot"

[![example_histogram_4](docs/examples/data_distribution/histogram/histogram_4.png)](examples/data_distribution/histogram/histogram_4.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/histogram/histogram_4.cpp"
```

===! "Plot"

[![example_histogram_5](docs/examples/data_distribution/histogram/histogram_5.png)](examples/data_distribution/histogram/histogram_5.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/histogram/histogram_5.cpp"
```

===! "Plot"

[![example_histogram_6](docs/examples/data_distribution/histogram/histogram_6.png)](examples/data_distribution/histogram/histogram_6.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/histogram/histogram_6.cpp"
```

===! "Plot"

[![example_histogram_7](docs/examples/data_distribution/histogram/histogram_7.svg)](examples/data_distribution/histogram/histogram_7.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/histogram/histogram_7.cpp"
```

===! "Plot"

[![example_histogram_8](docs/examples/data_distribution/histogram/histogram_8.png)](examples/data_distribution/histogram/histogram_8.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/histogram/histogram_8.cpp"
```

===! "Plot"

[![example_histogram_9](docs/examples/data_distribution/histogram/histogram_9.png)](examples/data_distribution/histogram/histogram_9.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/histogram/histogram_9.cpp"
```

===! "Plot"

[![example_histogram_10](docs/examples/data_distribution/histogram/histogram_10.svg)](examples/data_distribution/histogram/histogram_10.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/histogram/histogram_10.cpp"
```

===! "Plot"

[![example_histogram_11](docs/examples/data_distribution/histogram/histogram_11.svg)](examples/data_distribution/histogram/histogram_11.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/histogram/histogram_11.cpp"
```

===! "Plot"

[![example_histogram_12](docs/examples/data_distribution/histogram/histogram_12.svg)](examples/data_distribution/histogram/histogram_12.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/histogram/histogram_12.cpp"
```

===! "Plot"

[![example_histogram_14](docs/examples/data_distribution/histogram/histogram_14.png)](examples/data_distribution/histogram/histogram_14.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/histogram/histogram_14.cpp"
```

Boxplot

boxplot(data);
See result

example_boxplot_1

More Examples:

example_boxplot_2 example_boxplot_3

===! "Plot"

[![example_boxplot_1](docs/examples/data_distribution/boxplot/boxplot_1.svg)](examples/data_distribution/boxplot/boxplot_1.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/boxplot/boxplot_1.cpp"
```

More Examples:

===! "Plot"

[![example_boxplot_2](docs/examples/data_distribution/boxplot/boxplot_2.svg)](examples/data_distribution/boxplot/boxplot_2.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/boxplot/boxplot_2.cpp"
```

===! "Plot"

[![example_boxplot_3](docs/examples/data_distribution/boxplot/boxplot_3.png)](examples/data_distribution/boxplot/boxplot_3.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/boxplot/boxplot_3.cpp"
```

Scatter Plot

scatter(x,y);
See result

example_scatter_1

More Examples:

example_scatter_2 example_scatter_3 example_scatter_4 example_scatter_5 example_scatter_6 example_scatter_7 example_scatter_8

===! "Plot"

[![example_scatter_1](docs/examples/data_distribution/scatter/scatter_1.svg)](examples/data_distribution/scatter/scatter_1.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/scatter/scatter_1.cpp"
```

More Examples:

===! "Plot"

[![example_scatter_2](docs/examples/data_distribution/scatter/scatter_2.svg)](examples/data_distribution/scatter/scatter_2.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/scatter/scatter_2.cpp"
```

===! "Plot"

[![example_scatter_3](docs/examples/data_distribution/scatter/scatter_3.svg)](examples/data_distribution/scatter/scatter_3.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/scatter/scatter_3.cpp"
```

===! "Plot"

[![example_scatter_4](docs/examples/data_distribution/scatter/scatter_4.svg)](examples/data_distribution/scatter/scatter_4.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/scatter/scatter_4.cpp"
```

===! "Plot"

[![example_scatter_5](docs/examples/data_distribution/scatter/scatter_5.svg)](examples/data_distribution/scatter/scatter_5.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/scatter/scatter_5.cpp"
```

===! "Plot"

[![example_scatter_6](docs/examples/data_distribution/scatter/scatter_6.svg)](examples/data_distribution/scatter/scatter_6.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/scatter/scatter_6.cpp"
```

===! "Plot"

[![example_scatter_7](docs/examples/data_distribution/scatter/scatter_7.svg)](examples/data_distribution/scatter/scatter_7.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/scatter/scatter_7.cpp"
```

===! "Plot"

[![example_scatter_8](docs/examples/data_distribution/scatter/scatter_8.svg)](examples/data_distribution/scatter/scatter_8.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/scatter/scatter_8.cpp"
```

Scatter plots also depend on the line object. As the line object can represent lines with markers, the scatter function simply creates markers without the lines.

Scatter Plot 3D

scatter(x,y,z);
See result

example_scatter3_1

More Examples:

example_scatter3_2 example_scatter3_3 example_scatter3_4 example_scatter3_5 example_scatter3_6

===! "Plot"

[![example_scatter3_1](docs/examples/data_distribution/scatter3/scatter3_1.svg)](examples/data_distribution/scatter3/scatter3_1.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/scatter3/scatter3_1.cpp"
```

More Examples:

===! "Plot"

[![example_scatter3_2](docs/examples/data_distribution/scatter3/scatter3_2.svg)](examples/data_distribution/scatter3/scatter3_2.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/scatter3/scatter3_2.cpp"
```

===! "Plot"

[![example_scatter3_3](docs/examples/data_distribution/scatter3/scatter3_3.svg)](examples/data_distribution/scatter3/scatter3_3.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/scatter3/scatter3_3.cpp"
```

===! "Plot"

[![example_scatter3_4](docs/examples/data_distribution/scatter3/scatter3_4.svg)](examples/data_distribution/scatter3/scatter3_4.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/scatter3/scatter3_4.cpp"
```

===! "Plot"

[![example_scatter3_5](docs/examples/data_distribution/scatter3/scatter3_5.svg)](examples/data_distribution/scatter3/scatter3_5.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/scatter3/scatter3_5.cpp"
```

===! "Plot"

[![example_scatter3_6](docs/examples/data_distribution/scatter3/scatter3_6.png)](examples/data_distribution/scatter3/scatter3_6.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/scatter3/scatter3_6.cpp"
```

Binned Scatter Plots

binscatter(x,y);
See result

example_binscatter_1

More Examples:

example_binscatter_2 example_binscatter_3 example_binscatter_4 example_binscatter_5 example_binscatter_6 example_binscatter_7

===! "Plot"

[![example_binscatter_1](docs/examples/data_distribution/binscatter/binscatter_1.png)](examples/data_distribution/binscatter/binscatter_1.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/binscatter/binscatter_1.cpp"
```

More Examples:

===! "Plot"

[![example_binscatter_2](docs/examples/data_distribution/binscatter/binscatter_2.png)](examples/data_distribution/binscatter/binscatter_2.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/binscatter/binscatter_2.cpp"
```

===! "Plot"

[![example_binscatter_3](docs/examples/data_distribution/binscatter/binscatter_3.png)](examples/data_distribution/binscatter/binscatter_3.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/binscatter/binscatter_3.cpp"
```

===! "Plot"

[![example_binscatter_4](docs/examples/data_distribution/binscatter/binscatter_4.png)](examples/data_distribution/binscatter/binscatter_4.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/binscatter/binscatter_4.cpp"
```

===! "Plot"

[![example_binscatter_5](docs/examples/data_distribution/binscatter/binscatter_5.png)](examples/data_distribution/binscatter/binscatter_5.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/binscatter/binscatter_5.cpp"
```

===! "Plot"

[![example_binscatter_6](docs/examples/data_distribution/binscatter/binscatter_6.png)](examples/data_distribution/binscatter/binscatter_6.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/binscatter/binscatter_6.cpp"
```

===! "Plot"

[![example_binscatter_7](docs/examples/data_distribution/binscatter/binscatter_7.svg)](examples/data_distribution/binscatter/binscatter_7.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/binscatter/binscatter_7.cpp"
```

Binned scatter plots use variations of the histogram algorithms of the previous section as an extra step to place all the data into two-dimensional bins that can be represented with varying colors or sizes. This is useful when there are so many data points that a scatter plot would be impractical for visualizing the data.

Plot Matrix

plotmatrix(X);
See result

example_plotmatrix_1

More Examples:

example_plotmatrix_2 example_plotmatrix_3 example_plotmatrix_4

===! "Plot"

[![example_plotmatrix_1](docs/examples/data_distribution/plotmatrix/plotmatrix_1.svg)](examples/data_distribution/plotmatrix/plotmatrix_1.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/plotmatrix/plotmatrix_1.cpp"
```

More Examples:

===! "Plot"

[![example_plotmatrix_2](docs/examples/data_distribution/plotmatrix/plotmatrix_2.png)](examples/data_distribution/plotmatrix/plotmatrix_2.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/plotmatrix/plotmatrix_2.cpp"
```

===! "Plot"

[![example_plotmatrix_3](docs/examples/data_distribution/plotmatrix/plotmatrix_3.png)](examples/data_distribution/plotmatrix/plotmatrix_3.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/plotmatrix/plotmatrix_3.cpp"
```

===! "Plot"

[![example_plotmatrix_4](docs/examples/data_distribution/plotmatrix/plotmatrix_4.svg)](examples/data_distribution/plotmatrix/plotmatrix_4.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/plotmatrix/plotmatrix_4.cpp"
```

The Plot Matrix subcategory is a combination of histograms and scatter plots. It creates a matrix of axes objects on the figure and creates a scatter plot for each pair of data sets.

Parallel Coordinates

parallelplot(X);
See result

example_parallelplot_1

More Examples:

example_parallelplot_2 example_parallelplot_3

===! "Plot"

[![example_parallelplot_1](docs/examples/data_distribution/parallelplot/parallelplot_1.svg)](examples/data_distribution/parallelplot/parallelplot_1.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/parallelplot/parallelplot_1.cpp"
```

More Examples:

===! "Plot"

[![example_parallelplot_2](docs/examples/data_distribution/parallelplot/parallelplot_2.svg)](examples/data_distribution/parallelplot/parallelplot_2.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/parallelplot/parallelplot_2.cpp"
```

===! "Plot"

[![example_parallelplot_3](docs/examples/data_distribution/parallelplot/parallelplot_3.svg)](examples/data_distribution/parallelplot/parallelplot_3.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/parallelplot/parallelplot_3.cpp"
```

The function parallelplot creates a plot with Parallel Coordinates. In this type of plot, a parallel lines object stores an arbitrary set of axis objects to represent multi-dimensional data.

Pie Chart

pie(x);
See result

example_pie_1

More Examples:

example_pie_2 example_pie_3 example_pie_4 example_pie_5 example_pie_6

===! "Plot"

[![example_pie_1](docs/examples/data_distribution/pie/pie_1.svg)](examples/data_distribution/pie/pie_1.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/pie/pie_1.cpp"
```

More Examples:

===! "Plot"

[![example_pie_2](docs/examples/data_distribution/pie/pie_2.svg)](examples/data_distribution/pie/pie_2.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/pie/pie_2.cpp"
```

===! "Plot"

[![example_pie_3](docs/examples/data_distribution/pie/pie_3.svg)](examples/data_distribution/pie/pie_3.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/pie/pie_3.cpp"
```

===! "Plot"

[![example_pie_4](docs/examples/data_distribution/pie/pie_4.svg)](examples/data_distribution/pie/pie_4.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/pie/pie_4.cpp"
```

===! "Plot"

[![example_pie_5](docs/examples/data_distribution/pie/pie_5.svg)](examples/data_distribution/pie/pie_5.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/pie/pie_5.cpp"
```

===! "Plot"

[![example_pie_6](docs/examples/data_distribution/pie/pie_6.svg)](examples/data_distribution/pie/pie_6.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/pie/pie_6.cpp"
```

Heatmap

heatmap(data);
See result

example_heatmap_1

More Examples:

example_heatmap_2 example_heatmap_3 example_heatmap_4 example_heatmap_5 example_heatmap_6 example_heatmap_7

===! "Plot"

[![example_heatmap_1](docs/examples/data_distribution/heatmap/heatmap_1.png)](examples/data_distribution/heatmap/heatmap_1.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/heatmap/heatmap_1.cpp"
```

More Examples:

===! "Plot"

[![example_heatmap_2](docs/examples/data_distribution/heatmap/heatmap_2.png)](examples/data_distribution/heatmap/heatmap_2.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/heatmap/heatmap_2.cpp"
```

===! "Plot"

[![example_heatmap_3](docs/examples/data_distribution/heatmap/heatmap_3.png)](examples/data_distribution/heatmap/heatmap_3.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/heatmap/heatmap_3.cpp"
```

===! "Plot"

[![example_heatmap_4](docs/examples/data_distribution/heatmap/heatmap_4.png)](examples/data_distribution/heatmap/heatmap_4.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/heatmap/heatmap_4.cpp"
```

===! "Plot"

[![example_heatmap_5](docs/examples/data_distribution/heatmap/heatmap_5.png)](examples/data_distribution/heatmap/heatmap_5.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/heatmap/heatmap_5.cpp"
```

===! "Plot"

[![example_heatmap_6](docs/examples/data_distribution/heatmap/heatmap_6.png)](examples/data_distribution/heatmap/heatmap_6.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/heatmap/heatmap_6.cpp"
```

===! "Plot"

[![example_heatmap_7](docs/examples/data_distribution/heatmap/heatmap_7.png)](examples/data_distribution/heatmap/heatmap_7.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/heatmap/heatmap_7.cpp"
```

Word Cloud

wordcloud(text, black_list);
See result

example_wordcloud_1

More Examples:

example_wordcloud_3 example_wordcloud_4 example_wordcloud_4

===! "Plot"

[![example_wordcloud_1](docs/examples/data_distribution/wordcloud/wordcloud_1.png)](examples/data_distribution/wordcloud/wordcloud_1.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/wordcloud/wordcloud_1.cpp"
```

More Examples:

===! "Plot"

[![example_wordcloud_3](docs/examples/data_distribution/wordcloud/wordcloud_3.png)](examples/data_distribution/wordcloud/wordcloud_3.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/wordcloud/wordcloud_3.cpp"
```

===! "Plot"

[![example_wordcloud_4](docs/examples/data_distribution/wordcloud/wordcloud_4.png)](examples/data_distribution/wordcloud/wordcloud_4.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/wordcloud/wordcloud_4.cpp"
```

===! "Plot"

[![example_wordcloud_4](docs/examples/data_distribution/wordcloud/wordcloud_4.png)](examples/data_distribution/wordcloud/wordcloud_4.cpp)

=== "C++"

```cpp
--8<-- "examples/data_distribution/wordcloud/wordcloud_4.cpp"
```

Word clouds are generated from text or pairs of words and their frequency. After attributing a size proportional to each word frequency, the algorithm to position the labels iterates words from the largest to the smallest. For each word, it spins the word in polar coordinates converted to Cartesian coordinates until it does not overlap with any other word.

By default, the colors and the sizes depend on the word frequencies. We can customize the colors by passing a third parameter to the wordcloud function.

Discrete Data

Bar Plot | Pareto Chart | Stem Plot | Stem Plot 3D

Bar Plot

bar(y);
See result

example_bar_1

More Examples:

example_bar_2 example_bar_3 example_bar_4 example_bar_5 example_bar_6 example_bar_7 example_bar_8 example_bar_9 example_bar_10 example_bar_11 example_bar_12 example_bar_13

===! "Plot"

[![example_bar_1](docs/examples/discrete_data/bar/bar_1.png)](examples/discrete_data/bar/bar_1.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/bar/bar_1.cpp"
```

More Examples:

===! "Plot"

[![example_bar_2](docs/examples/discrete_data/bar/bar_2.png)](examples/discrete_data/bar/bar_2.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/bar/bar_2.cpp"
```

===! "Plot"

[![example_bar_3](docs/examples/discrete_data/bar/bar_3.png)](examples/discrete_data/bar/bar_3.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/bar/bar_3.cpp"
```

===! "Plot"

[![example_bar_4](docs/examples/discrete_data/bar/bar_4.png)](examples/discrete_data/bar/bar_4.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/bar/bar_4.cpp"
```

===! "Plot"

[![example_bar_5](docs/examples/discrete_data/bar/bar_5.png)](examples/discrete_data/bar/bar_5.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/bar/bar_5.cpp"
```

===! "Plot"

[![example_bar_6](docs/examples/discrete_data/bar/bar_6.png)](examples/discrete_data/bar/bar_6.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/bar/bar_6.cpp"
```

===! "Plot"

[![example_bar_7](docs/examples/discrete_data/bar/bar_7.svg)](examples/discrete_data/bar/bar_7.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/bar/bar_7.cpp"
```

===! "Plot"

[![example_bar_8](docs/examples/discrete_data/bar/bar_8.png)](examples/discrete_data/bar/bar_8.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/bar/bar_8.cpp"
```

===! "Plot"

[![example_bar_9](docs/examples/discrete_data/bar/bar_9.png)](examples/discrete_data/bar/bar_9.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/bar/bar_9.cpp"
```

===! "Plot"

[![example_bar_10](docs/examples/discrete_data/bar/bar_10.png)](examples/discrete_data/bar/bar_10.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/bar/bar_10.cpp"
```

===! "Plot"

[![example_bar_11](docs/examples/discrete_data/bar/bar_11.png)](examples/discrete_data/bar/bar_11.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/bar/bar_11.cpp"
```

===! "Plot"

[![example_bar_12](docs/examples/discrete_data/bar/bar_12.png)](examples/discrete_data/bar/bar_12.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/bar/bar_12.cpp"
```

===! "Plot"

[![example_bar_13](docs/examples/discrete_data/bar/bar_13.png)](examples/discrete_data/bar/bar_13.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/bar/bar_13.cpp"
```

Pareto Chart

pareto(y);
See result

example_pareto_1

More Examples:

example_pareto_2 example_pareto_3 example_pareto_4

===! "Plot"

[![example_pareto_1](docs/examples/discrete_data/pareto/pareto_1.svg)](examples/discrete_data/pareto/pareto_1.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/pareto/pareto_1.cpp"
```

More Examples:

===! "Plot"

[![example_pareto_2](docs/examples/discrete_data/pareto/pareto_2.svg)](examples/discrete_data/pareto/pareto_2.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/pareto/pareto_2.cpp"
```

===! "Plot"

[![example_pareto_3](docs/examples/discrete_data/pareto/pareto_3.svg)](examples/discrete_data/pareto/pareto_3.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/pareto/pareto_3.cpp"
```

===! "Plot"

[![example_pareto_4](docs/examples/discrete_data/pareto/pareto_4.svg)](examples/discrete_data/pareto/pareto_4.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/pareto/pareto_4.cpp"
```

Pareto Charts are a type of chart that uses both axes. The axis is used to represent bars with the data values in descending order. The axis is used to represent the cumulative distribution function of the data in the axis. By default, a Pareto Chart includes up to 10 items or as many items as needed to represent 95% of the cumulative distribution.

If you need Pareto fronts rather than Pareto charts, we refer to Scatter Plots for two-dimensional fronts, Plot matrices for three-dimensional fronts, or Parallel Coordinate Plots for many-objective fronts. These plot subcategories are described in Section Data Distribution. If you also need a tool to calculate these fronts efficiently, we refer to the Pareto Front Library.

Stem Plot

stem(Y);
See result

example_stem_1

More Examples:

example_stem_2 example_stem_3 example_stem_4 example_stem_5 example_stem_6 example_stem_7 example_stem_8 example_stem_9

===! "Plot"

[![example_stem_1](docs/examples/discrete_data/stem/stem_1.svg)](examples/discrete_data/stem/stem_1.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem/stem_1.cpp"
```

More Examples:

===! "Plot"

[![example_stem_2](docs/examples/discrete_data/stem/stem_2.svg)](examples/discrete_data/stem/stem_2.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem/stem_2.cpp"
```

===! "Plot"

[![example_stem_3](docs/examples/discrete_data/stem/stem_3.svg)](examples/discrete_data/stem/stem_3.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem/stem_3.cpp"
```

===! "Plot"

[![example_stem_4](docs/examples/discrete_data/stem/stem_4.svg)](examples/discrete_data/stem/stem_4.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem/stem_4.cpp"
```

===! "Plot"

[![example_stem_5](docs/examples/discrete_data/stem/stem_5.svg)](examples/discrete_data/stem/stem_5.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem/stem_5.cpp"
```

===! "Plot"

[![example_stem_6](docs/examples/discrete_data/stem/stem_6.svg)](examples/discrete_data/stem/stem_6.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem/stem_6.cpp"
```

===! "Plot"

[![example_stem_7](docs/examples/discrete_data/stem/stem_7.svg)](examples/discrete_data/stem/stem_7.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem/stem_7.cpp"
```

===! "Plot"

[![example_stem_8](docs/examples/discrete_data/stem/stem_8.svg)](examples/discrete_data/stem/stem_8.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem/stem_8.cpp"
```

===! "Plot"

[![example_stem_9](docs/examples/discrete_data/stem/stem_9.svg)](examples/discrete_data/stem/stem_9.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem/stem_9.cpp"
```

Stem Plot 3D

stem3(z);
See result

example_stem3_1

More Examples:

example_stem3_2 example_stem3_3 example_stem3_4 example_stem3_5 example_stem3_6 example_stem3_7 example_stem3_8 example_stem3_9 example_stem3_10 example_stem3_11

===! "Plot"

[![example_stem3_1](docs/examples/discrete_data/stem3/stem3_1.svg)](examples/discrete_data/stem3/stem3_1.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem3/stem3_1.cpp"
```

More Examples:

===! "Plot"

[![example_stem3_2](docs/examples/discrete_data/stem3/stem3_2.svg)](examples/discrete_data/stem3/stem3_2.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem3/stem3_2.cpp"
```

===! "Plot"

[![example_stem3_3](docs/examples/discrete_data/stem3/stem3_3.svg)](examples/discrete_data/stem3/stem3_3.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem3/stem3_3.cpp"
```

===! "Plot"

[![example_stem3_4](docs/examples/discrete_data/stem3/stem3_4.svg)](examples/discrete_data/stem3/stem3_4.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem3/stem3_4.cpp"
```

===! "Plot"

[![example_stem3_5](docs/examples/discrete_data/stem3/stem3_5.svg)](examples/discrete_data/stem3/stem3_5.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem3/stem3_5.cpp"
```

===! "Plot"

[![example_stem3_6](docs/examples/discrete_data/stem3/stem3_6.svg)](examples/discrete_data/stem3/stem3_6.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem3/stem3_6.cpp"
```

===! "Plot"

[![example_stem3_7](docs/examples/discrete_data/stem3/stem3_7.svg)](examples/discrete_data/stem3/stem3_7.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem3/stem3_7.cpp"
```

===! "Plot"

[![example_stem3_8](docs/examples/discrete_data/stem3/stem3_8.svg)](examples/discrete_data/stem3/stem3_8.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem3/stem3_8.cpp"
```

===! "Plot"

[![example_stem3_9](docs/examples/discrete_data/stem3/stem3_9.svg)](examples/discrete_data/stem3/stem3_9.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem3/stem3_9.cpp"
```

===! "Plot"

[![example_stem3_10](docs/examples/discrete_data/stem3/stem3_10.svg)](examples/discrete_data/stem3/stem3_10.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem3/stem3_10.cpp"
```

===! "Plot"

[![example_stem3_11](docs/examples/discrete_data/stem3/stem3_11.svg)](examples/discrete_data/stem3/stem3_11.cpp)

=== "C++"

```cpp
--8<-- "examples/discrete_data/stem3/stem3_11.cpp"
```

Geography

Geoplot | Geoscatter Plot | Geobubble | Geodensity Plot

Geoplot

geoplot(lat,lon);
See result

example_geoplot_1

More Examples:

example_geoplot_2 example_geoplot_3 example_geoplot_4 example_geoplot_5 example_geoplot_6 example_geoplot_7

===! "Plot"

[![example_geoplot_1](docs/examples/geography/geoplot/geoplot_1.png)](examples/geography/geoplot/geoplot_1.cpp)

=== "C++"

```cpp
--8<-- "examples/geography/geoplot/geoplot_1.cpp"
```

More Examples:

===! "Plot"

[![example_geoplot_2](docs/examples/geography/geoplot/geoplot_2.png)](examples/geography/geoplot/geoplot_2.cpp)

=== "C++"

```cpp
--8<-- "examples/geography/geoplot/geoplot_2.cpp"
```

===! "Plot"

[![example_geoplot_3](docs/examples/geography/geoplot/geoplot_3.png)](examples/geography/geoplot/geoplot_3.cpp)

=== "C++"

```cpp
--8<-- "examples/geography/geoplot/geoplot_3.cpp"
```

===! "Plot"

[![example_geoplot_4](docs/examples/geography/geoplot/geoplot_4.png)](examples/geography/geoplot/geoplot_4.cpp)

=== "C++"

```cpp
--8<-- "examples/geography/geoplot/geoplot_4.cpp"
```

===! "Plot"

[![example_geoplot_5](docs/examples/geography/geoplot/geoplot_5.png)](examples/geography/geoplot/geoplot_5.cpp)

=== "C++"

```cpp
--8<-- "examples/geography/geoplot/geoplot_5.cpp"
```

===! "Plot"

[![example_geoplot_6](docs/examples/geography/geoplot/geoplot_6.png)](examples/geography/geoplot/geoplot_6.cpp)

=== "C++"

```cpp
--8<-- "examples/geography/geoplot/geoplot_6.cpp"
```

===! "Plot"

[![example_geoplot_7](docs/examples/geography/geoplot/geoplot_7.png)](examples/geography/geoplot/geoplot_7.cpp)

=== "C++"

```cpp
--8<-- "examples/geography/geoplot/geoplot_7.cpp"
```

For the first geography plot, Matplot++ calls geoplot(), which creates a filled polygon with the world map. This first plot receives the tag "map" so that subsequent geography plots recognize there is no need to recreate this world map.

The data for the world map comes from Natural Earth. They provide data at 1:10m, 1:50m, and 1:110m scales. The geoplot function will initially use the data at the 1:110m scales. The geolimits function can be used to update the axis limits for geography plots. The difference between the usual functions for adjusting axis limits (xlim and ylim) and geolimits is that the latter will also update the map resolution according to the new limits for the and axis.

The geolimits function will query the figure size and, depending on the new limits for the axes, update the map to the 1:10m, or 1:50m scales if needed. Because it would be very inefficient to render the whole world map at a 1:10m or 1:50m scale only to display a region of this map, the geolimits function also crops the data pertinent to the new region being displayed.

Note that this does not only involve removing data points outside the new limits but it also needs to create new data points on the correct borders to create new polygons coherent with the map entry points in the region. For this reason, the algorithm needs to track all submaps represented as closed polygons in the original world map. If submaps are completely inside or outside the new ranges, we can respectively include or dismiss the data points. However, if the submap is only partially inside the new limits, to generate the correct borders for the polygons, we need to track all points outside the limits to classify the directions of these points outside the limits. We do that by only including points that change quadrants around the new limits so that the map entry points create polygons that look like they would if the complete world map were still being rendered outside these new limits.

If the you are not interested in geographic plots, the build script includes an option to remove the high-resolution maps at 1:10m and 1:50m scales from the library. In this case, the library will always use the map at a 1:110m scale no matter the axis limits.

The function world_cities returns a list of major world cities. Its parameters define the minimum distances between cities in the and axes. The greedy_tsp function is a naive greedy algorithm to find a route between these cities as a Traveling Salesman Problem (TSP). We use the geoplot function to draw this route. Note that we use method chaining to define some further plot properties. Finally, the text function includes the city names in the map.

Geoscatter Plot

geoscatter(lat,lon);
See result

example_geoscatter_1

More Examples:

example_geoscatter_2

===! "Plot"

[![example_geoscatter_1](docs/examples/geography/geoscatter/geoscatter_1.png)](examples/geography/geoscatter/geoscatter_1.cpp)

=== "C++"

```cpp
--8<-- "examples/geography/geoscatter/geoscatter_1.cpp"
```

More Examples:

===! "Plot"

[![example_geoscatter_2](docs/examples/geography/geoscatter/geoscatter_2.png)](examples/geography/geoscatter/geoscatter_2.cpp)

=== "C++"

```cpp
--8<-- "examples/geography/geoscatter/geoscatter_2.cpp"
```

Geobubble

geobubble(lat,lon,sizes);
See result

example_geobubble_1

More Examples:

example_geobubble_2

===! "Plot"

[![example_geobubble_1](docs/examples/geography/geobubble/geobubble_1.png)](examples/geography/geobubble/geobubble_1.cpp)

=== "C++"

```cpp
--8<-- "examples/geography/geobubble/geobubble_1.cpp"
```

More Examples:

===! "Plot"

[![example_geobubble_2](docs/examples/geography/geobubble/geobubble_2.png)](examples/geography/geobubble/geobubble_2.cpp)

=== "C++"

```cpp
--8<-- "examples/geography/geobubble/geobubble_2.cpp"
```

Geodensity Plot

geodensityplot(lat, lon);
See result

example_geodensityplot_1

=== "Plot"

[![example_geodensityplot_1](docs/examples/geography/geodensityplot/geodensityplot_1.png)](examples/geography/geodensityplot/geodensityplot_1.cpp)

=== "C++"

```cpp
--8<-- "examples/geography/geodensityplot/geodensityplot_1.cpp"
```

Polar Plots

Polar Line Plot | Polar Scatter Plot | Polar Histogram | Compass | Polar Function

Polar Line Plot

polarplot(theta, rho);
See result

example_polarplot_1

More Examples:

example_polarplot_2 example_polarplot_3 example_polarplot_4 example_polarplot_5 example_polarplot_6 example_polarplot_7 example_polarplot_8

===! "Plot"

[![example_polarplot_1](docs/examples/polar_plots/polarplot/polarplot_1.svg)](examples/polar_plots/polarplot/polarplot_1.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarplot/polarplot_1.cpp"
```

More Examples:

===! "Plot"

[![example_polarplot_2](docs/examples/polar_plots/polarplot/polarplot_2.svg)](examples/polar_plots/polarplot/polarplot_2.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarplot/polarplot_2.cpp"
```

===! "Plot"

[![example_polarplot_3](docs/examples/polar_plots/polarplot/polarplot_3.svg)](examples/polar_plots/polarplot/polarplot_3.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarplot/polarplot_3.cpp"
```

===! "Plot"

[![example_polarplot_4](docs/examples/polar_plots/polarplot/polarplot_4.svg)](examples/polar_plots/polarplot/polarplot_4.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarplot/polarplot_4.cpp"
```

===! "Plot"

[![example_polarplot_5](docs/examples/polar_plots/polarplot/polarplot_5.svg)](examples/polar_plots/polarplot/polarplot_5.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarplot/polarplot_5.cpp"
```

===! "Plot"

[![example_polarplot_6](docs/examples/polar_plots/polarplot/polarplot_6.svg)](examples/polar_plots/polarplot/polarplot_6.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarplot/polarplot_6.cpp"
```

===! "Plot"

[![example_polarplot_7](docs/examples/polar_plots/polarplot/polarplot_7.svg)](examples/polar_plots/polarplot/polarplot_7.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarplot/polarplot_7.cpp"
```

===! "Plot"

[![example_polarplot_8](docs/examples/polar_plots/polarplot/polarplot_8.svg)](examples/polar_plots/polarplot/polarplot_8.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarplot/polarplot_8.cpp"
```

By emplacing a polar plot in the axes, the axes move to a polar mode, where we use the and axis instead of the and axis.

From the backend point of view, these axes are an abstraction to the user. The data points in the and axis are drawn by converting the positions from the polar coordinates and to the Cartesian coordinates and with the relationships and .

Aside from this conversion, these plot subcategories are analogous to line plots, scatter plots, histograms, quiver plots, and line functions.

Polar Scatter Plot

polarscatter(theta, rho);
See result

example_polarscatter_1

More Examples:

example_polarscatter_2 example_polarscatter_3 example_polarscatter_4 example_polarscatter_5 example_polarscatter_6

===! "Plot"

[![example_polarscatter_1](docs/examples/polar_plots/polarscatter/polarscatter_1.svg)](examples/polar_plots/polarscatter/polarscatter_1.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarscatter/polarscatter_1.cpp"
```

More Examples:

===! "Plot"

[![example_polarscatter_2](docs/examples/polar_plots/polarscatter/polarscatter_2.svg)](examples/polar_plots/polarscatter/polarscatter_2.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarscatter/polarscatter_2.cpp"
```

===! "Plot"

[![example_polarscatter_3](docs/examples/polar_plots/polarscatter/polarscatter_3.svg)](examples/polar_plots/polarscatter/polarscatter_3.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarscatter/polarscatter_3.cpp"
```

===! "Plot"

[![example_polarscatter_4](docs/examples/polar_plots/polarscatter/polarscatter_4.svg)](examples/polar_plots/polarscatter/polarscatter_4.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarscatter/polarscatter_4.cpp"
```

===! "Plot"

[![example_polarscatter_5](docs/examples/polar_plots/polarscatter/polarscatter_5.svg)](examples/polar_plots/polarscatter/polarscatter_5.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarscatter/polarscatter_5.cpp"
```

===! "Plot"

[![example_polarscatter_6](docs/examples/polar_plots/polarscatter/polarscatter_6.svg)](examples/polar_plots/polarscatter/polarscatter_6.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarscatter/polarscatter_6.cpp"
```

Polar Histogram

polarhistogram(theta, 6);
See result

example_polarhistogram_1

More Examples:

example_polarhistogram_2 example_polarhistogram_3 example_polarhistogram_4 example_polarhistogram_5

===! "Plot"

[![example_polarhistogram_1](docs/examples/polar_plots/polarhistogram/polarhistogram_1.svg)](examples/polar_plots/polarhistogram/polarhistogram_1.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarhistogram/polarhistogram_1.cpp"
```

More Examples:

===! "Plot"

[![example_polarhistogram_2](docs/examples/polar_plots/polarhistogram/polarhistogram_2.svg)](examples/polar_plots/polarhistogram/polarhistogram_2.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarhistogram/polarhistogram_2.cpp"
```

===! "Plot"

[![example_polarhistogram_3](docs/examples/polar_plots/polarhistogram/polarhistogram_3.svg)](examples/polar_plots/polarhistogram/polarhistogram_3.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarhistogram/polarhistogram_3.cpp"
```

===! "Plot"

[![example_polarhistogram_4](docs/examples/polar_plots/polarhistogram/polarhistogram_4.svg)](examples/polar_plots/polarhistogram/polarhistogram_4.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarhistogram/polarhistogram_4.cpp"
```

===! "Plot"

[![example_polarhistogram_5](docs/examples/polar_plots/polarhistogram/polarhistogram_5.svg)](examples/polar_plots/polarhistogram/polarhistogram_5.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/polarhistogram/polarhistogram_5.cpp"
```

The function polarhistogram distributes the data into the number of bins provided as its second parameter.

Compass

compass(u, v);
See result

example_compass_1

More Examples:

example_compass_2

===! "Plot"

[![example_compass_1](docs/examples/polar_plots/compass/compass_1.svg)](examples/polar_plots/compass/compass_1.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/compass/compass_1.cpp"
```

More Examples:

===! "Plot"

[![example_compass_2](docs/examples/polar_plots/compass/compass_2.svg)](examples/polar_plots/compass/compass_2.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/compass/compass_2.cpp"
```

Polar Function

ezpolar(fn);
See result

example_ezpolar_1

More Examples:

example_ezpolar_2

===! "Plot"

[![example_ezpolar_1](docs/examples/polar_plots/ezpolar/ezpolar_1.svg)](examples/polar_plots/ezpolar/ezpolar_1.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/ezpolar/ezpolar_1.cpp"
```

More Examples:

===! "Plot"

[![example_ezpolar_2](docs/examples/polar_plots/ezpolar/ezpolar_2.svg)](examples/polar_plots/ezpolar/ezpolar_2.cpp)

=== "C++"

```cpp
--8<-- "examples/polar_plots/ezpolar/ezpolar_2.cpp"
```

Contour Plots

Contour | Filled Contour | Function Contour

Contour

contour(X, Y, Z);
See result

example_contour_1

More Examples:

example_contour_2 example_contour_3 example_contour_4 example_contour_5 example_contour_6 example_contour_7 example_contour_8

===! "Plot"

[![example_contour_1](docs/examples/contour_plots/contour/contour_1.svg)](examples/contour_plots/contour/contour_1.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/contour/contour_1.cpp"
```

More Examples:

===! "Plot"

[![example_contour_2](docs/examples/contour_plots/contour/contour_2.svg)](examples/contour_plots/contour/contour_2.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/contour/contour_2.cpp"
```

===! "Plot"

[![example_contour_3](docs/examples/contour_plots/contour/contour_3.svg)](examples/contour_plots/contour/contour_3.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/contour/contour_3.cpp"
```

===! "Plot"

[![example_contour_4](docs/examples/contour_plots/contour/contour_4.svg)](examples/contour_plots/contour/contour_4.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/contour/contour_4.cpp"
```

===! "Plot"

[![example_contour_5](docs/examples/contour_plots/contour/contour_5.svg)](examples/contour_plots/contour/contour_5.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/contour/contour_5.cpp"
```

===! "Plot"

[![example_contour_6](docs/examples/contour_plots/contour/contour_6.svg)](examples/contour_plots/contour/contour_6.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/contour/contour_6.cpp"
```

===! "Plot"

[![example_contour_7](docs/examples/contour_plots/contour/contour_7.svg)](examples/contour_plots/contour/contour_7.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/contour/contour_7.cpp"
```

===! "Plot"

[![example_contour_8](docs/examples/contour_plots/contour/contour_8.svg)](examples/contour_plots/contour/contour_8.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/contour/contour_8.cpp"
```

All these subcategories depend on the contours type. They also depend on lazy evaluation for generating the contour lines. When the function draw is called in the contours class, it preprocesses all contour lines for a three-dimensional function.

Although it is relatively simple to show a heatmap with the values for the -axis, calculating contour lines relative to the -axis is more complex than it might seem at first. We provide the function contourc for calculating contour lines. This function uses an adaptation of the algorithm adopted by Matplotlib.

The algorithm creates a quad grid defined by the and values. It uses this grid to infer a contour line passing through positions with the same value. The algorithm sweeps through the grid twice to generate these lines. The first sweep looks for lines that start on the boundaries. The second sweep looks for interior closed loops.

Filled contours are closed polygons for pairs of contour levels. Some polygons for filled contours might be holes inside other polygons. The algorithm needs to keep track of these relationships so that we can render the polygons in their accurate order. To avoid an extra step that identifies this relationship between the polygons, the sweeping algorithm already identifies which polygons are holes for each level.

Once we find the quads with the contour line, the line is generated by interpolating the values around that quad.

Filled Contour

contourf(X, Y, Z);
See result

example_contourf_1

More Examples:

example_contourf_2 example_contourf_3 example_contourf_4 example_contourf_5 example_contourf_6

===! "Plot"

[![example_contourf_1](docs/examples/contour_plots/contourf/contourf_1.svg)](examples/contour_plots/contourf/contourf_1.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/contourf/contourf_1.cpp"
```

More Examples:

===! "Plot"

[![example_contourf_2](docs/examples/contour_plots/contourf/contourf_2.png)](examples/contour_plots/contourf/contourf_2.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/contourf/contourf_2.cpp"
```

===! "Plot"

[![example_contourf_3](docs/examples/contour_plots/contourf/contourf_3.png)](examples/contour_plots/contourf/contourf_3.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/contourf/contourf_3.cpp"
```

===! "Plot"

[![example_contourf_4](docs/examples/contour_plots/contourf/contourf_4.png)](examples/contour_plots/contourf/contourf_4.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/contourf/contourf_4.cpp"
```

===! "Plot"

[![example_contourf_5](docs/examples/contour_plots/contourf/contourf_5.png)](examples/contour_plots/contourf/contourf_5.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/contourf/contourf_5.cpp"
```

===! "Plot"

[![example_contourf_6](docs/examples/contour_plots/contourf/contourf_6.svg)](examples/contour_plots/contourf/contourf_6.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/contourf/contourf_6.cpp"
```

Function Contour

fcontour(f);
See result

example_fcontour_1

More Examples:

example_fcontour_2 example_fcontour_3 example_fcontour_4 example_fcontour_5 example_fcontour_6 example_fcontour_7 example_fcontour_8 example_fcontour_9 example_fcontour_10 example_fcontour_11

===! "Plot"

[![example_fcontour_1](docs/examples/contour_plots/fcontour/fcontour_1.svg)](examples/contour_plots/fcontour/fcontour_1.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/fcontour/fcontour_1.cpp"
```

More Examples:

===! "Plot"

[![example_fcontour_2](docs/examples/contour_plots/fcontour/fcontour_2.svg)](examples/contour_plots/fcontour/fcontour_2.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/fcontour/fcontour_2.cpp"
```

===! "Plot"

[![example_fcontour_3](docs/examples/contour_plots/fcontour/fcontour_3.svg)](examples/contour_plots/fcontour/fcontour_3.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/fcontour/fcontour_3.cpp"
```

===! "Plot"

[![example_fcontour_4](docs/examples/contour_plots/fcontour/fcontour_4.svg)](examples/contour_plots/fcontour/fcontour_4.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/fcontour/fcontour_4.cpp"
```

===! "Plot"

[![example_fcontour_5](docs/examples/contour_plots/fcontour/fcontour_5.svg)](examples/contour_plots/fcontour/fcontour_5.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/fcontour/fcontour_5.cpp"
```

===! "Plot"

[![example_fcontour_6](docs/examples/contour_plots/fcontour/fcontour_6.png)](examples/contour_plots/fcontour/fcontour_6.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/fcontour/fcontour_6.cpp"
```

===! "Plot"

[![example_fcontour_7](docs/examples/contour_plots/fcontour/fcontour_7.png)](examples/contour_plots/fcontour/fcontour_7.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/fcontour/fcontour_7.cpp"
```

===! "Plot"

[![example_fcontour_8](docs/examples/contour_plots/fcontour/fcontour_8.svg)](examples/contour_plots/fcontour/fcontour_8.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/fcontour/fcontour_8.cpp"
```

===! "Plot"

[![example_fcontour_9](docs/examples/contour_plots/fcontour/fcontour_9.png)](examples/contour_plots/fcontour/fcontour_9.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/fcontour/fcontour_9.cpp"
```

===! "Plot"

[![example_fcontour_10](docs/examples/contour_plots/fcontour/fcontour_10.png)](examples/contour_plots/fcontour/fcontour_10.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/fcontour/fcontour_10.cpp"
```

===! "Plot"

[![example_fcontour_11](docs/examples/contour_plots/fcontour/fcontour_11.png)](examples/contour_plots/fcontour/fcontour_11.cpp)

=== "C++"

```cpp
--8<-- "examples/contour_plots/fcontour/fcontour_11.cpp"
```

By default, the function fcontour will generate 9 contour lines from a lambda function. The functions contour and contourf, on the other hand, plot contour lines and filled contour lines from a grid of data points for , , and .

Vector Fields

Feather | Quiver | Quiver 3D

Quiver

quiver(x, y, u, v);
See result

example_quiver_1

More Examples:

example_quiver_2 example_quiver_3 example_quiver_4

===! "Plot"

[![example_quiver_1](docs/examples/vector_fields/quiver/quiver_1.svg)](examples/vector_fields/quiver/quiver_1.cpp)

=== "C++"

```cpp
--8<-- "examples/vector_fields/quiver/quiver_1.cpp"
```

More Examples:

===! "Plot"

[![example_quiver_2](docs/examples/vector_fields/quiver/quiver_2.svg)](examples/vector_fields/quiver/quiver_2.cpp)

=== "C++"

```cpp
--8<-- "examples/vector_fields/quiver/quiver_2.cpp"
```

===! "Plot"

[![example_quiver_3](docs/examples/vector_fields/quiver/quiver_3.svg)](examples/vector_fields/quiver/quiver_3.cpp)

=== "C++"

```cpp
--8<-- "examples/vector_fields/quiver/quiver_3.cpp"
```

===! "Plot"

[![example_quiver_4](docs/examples/vector_fields/quiver/quiver_4.svg)](examples/vector_fields/quiver/quiver_4.cpp)

=== "C++"

```cpp
--8<-- "examples/vector_fields/quiver/quiver_4.cpp"
```

===! "Plot"

[![example_quiver_6](docs/examples/vector_fields/quiver/quiver_6.svg)](examples/vector_fields/quiver/quiver_6.cpp)

=== "C++"

```cpp
--8<-- "examples/vector_fields/quiver/quiver_6.cpp"
```

All these subcategories depend on the vectors object type. In a two-dimensional plot, for each value of and with the position of a vector, it also requires the value of and indicating its direction and magnitude. In a three-dimensional plot, the direction and magnitude are defined by , , and .

A quiver plot (or velocity plot) shows a grid of vectors whose direction and magnitude are scaled to prevent the overlap between vectors in subsequent quads.

Quiver 3D

quiver3(Z, U, V, W);
See result

example_quiver3_1

===! "Plot"

[![example_quiver3_1](docs/examples/vector_fields/quiver3/quiver3_1.svg)](examples/vector_fields/quiver3/quiver3_1.cpp)

=== "C++"

```cpp
--8<-- "examples/vector_fields/quiver3/quiver3_1.cpp"
```

===! "Plot"

[![example_quiver3_2](docs/examples/vector_fields/quiver3/quiver3_2.svg)](examples/vector_fields/quiver3/quiver3_2.cpp)

=== "C++"

```cpp
--8<-- "examples/vector_fields/quiver3/quiver3_2.cpp"
```

Feather

feather(u, v);
See result

example_feather_1

===! "Plot"

[![example_feather_1](docs/examples/vector_fields/feather/feather_1.svg)](examples/vector_fields/feather/feather_1.cpp)

=== "C++"

```cpp
--8<-- "examples/vector_fields/feather/feather_1.cpp"
```

Surfaces

Surface | Surface with Contour | Mesh | Mesh with Contour | Mesh with Curtain | Function Surface | Function Mesh | Waterfall | Fence | Ribbon

Surface

surf(X, Y, Z);
See result

example_surf_1

More Examples:

example_surf_2 example_surf_3 example_surf_4 example_surf_5 example_surf_6

===! "Plot"

[![example_surf_1](docs/examples/surfaces/surf/surf_1.png)](examples/surfaces/surf/surf_1.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/surf/surf_1.cpp"
```

More Examples:

===! "Plot"

[![example_surf_2](docs/examples/surfaces/surf/surf_2.svg)](examples/surfaces/surf/surf_2.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/surf/surf_2.cpp"
```

===! "Plot"

[![example_surf_3](docs/examples/surfaces/surf/surf_3.svg)](examples/surfaces/surf/surf_3.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/surf/surf_3.cpp"
```

===! "Plot"

[![example_surf_4](docs/examples/surfaces/surf/surf_4.svg)](examples/surfaces/surf/surf_4.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/surf/surf_4.cpp"
```

===! "Plot"

[![example_surf_5](docs/examples/surfaces/surf/surf_5.svg)](examples/surfaces/surf/surf_5.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/surf/surf_5.cpp"
```

===! "Plot"

[![example_surf_6](docs/examples/surfaces/surf/surf_6.svg)](examples/surfaces/surf/surf_6.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/surf/surf_6.cpp"
```

Surface with Contour

surfc(X, Y, Z);
See result

example_surfc_1

More Examples:

example_surfc_2 example_surfc_3 example_surfc_4

===! "Plot"

[![example_surfc_1](docs/examples/surfaces/surfc/surfc_1.png)](examples/surfaces/surfc/surfc_1.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/surfc/surfc_1.cpp"
```

More Examples:

===! "Plot"

[![example_surfc_2](docs/examples/surfaces/surfc/surfc_2.svg)](examples/surfaces/surfc/surfc_2.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/surfc/surfc_2.cpp"
```

===! "Plot"

[![example_surfc_3](docs/examples/surfaces/surfc/surfc_3.png)](examples/surfaces/surfc/surfc_3.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/surfc/surfc_3.cpp"
```

===! "Plot"

[![example_surfc_4](docs/examples/surfaces/surfc/surfc_4.png)](examples/surfaces/surfc/surfc_4.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/surfc/surfc_4.cpp"
```

Mesh

mesh(X, Y, Z);
See result

example_mesh_1

More Examples:

example_mesh_2 example_mesh_3 example_mesh_4

===! "Plot"

[![example_mesh_1](docs/examples/surfaces/mesh/mesh_1.png)](examples/surfaces/mesh/mesh_1.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/mesh/mesh_1.cpp"
```

More Examples:

===! "Plot"

[![example_mesh_2](docs/examples/surfaces/mesh/mesh_2.png)](examples/surfaces/mesh/mesh_2.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/mesh/mesh_2.cpp"
```

===! "Plot"

[![example_mesh_3](docs/examples/surfaces/mesh/mesh_3.svg)](examples/surfaces/mesh/mesh_3.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/mesh/mesh_3.cpp"
```

===! "Plot"

[![example_mesh_4](docs/examples/surfaces/mesh/mesh_4.svg)](examples/surfaces/mesh/mesh_4.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/mesh/mesh_4.cpp"
```

Mesh with Contour

meshc(X, Y, Z);
See result

example_meshc_1

More Examples:

example_meshc_2 example_meshc_3

===! "Plot"

[![example_meshc_1](docs/examples/surfaces/meshc/meshc_1.png)](examples/surfaces/meshc/meshc_1.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/meshc/meshc_1.cpp"
```

More Examples:

===! "Plot"

[![example_meshc_2](docs/examples/surfaces/meshc/meshc_2.png)](examples/surfaces/meshc/meshc_2.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/meshc/meshc_2.cpp"
```

===! "Plot"

[![example_meshc_3](docs/examples/surfaces/meshc/meshc_3.png)](examples/surfaces/meshc/meshc_3.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/meshc/meshc_3.cpp"
```

Mesh with Curtain

meshz(X, Y, Z);
See result

example_meshz_1

More Examples:

example_meshz_2 example_meshz_3

===! "Plot"

[![example_meshz_1](docs/examples/surfaces/meshz/meshz_1.png)](examples/surfaces/meshz/meshz_1.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/meshz/meshz_1.cpp"
```

More Examples:

===! "Plot"

[![example_meshz_2](docs/examples/surfaces/meshz/meshz_2.png)](examples/surfaces/meshz/meshz_2.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/meshz/meshz_2.cpp"
```

===! "Plot"

[![example_meshz_3](docs/examples/surfaces/meshz/meshz_3.png)](examples/surfaces/meshz/meshz_3.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/meshz/meshz_3.cpp"
```

Function Surface

fsurf(fn);
See result

example_fsurf_1

More Examples:

example_fsurf_2 example_fsurf_3 example_fsurf_4 example_fsurf_5 example_fsurf_6 example_fsurf_7 example_fsurf_8

===! "Plot"

[![example_fsurf_1](docs/examples/surfaces/fsurf/fsurf_1.png)](examples/surfaces/fsurf/fsurf_1.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fsurf/fsurf_1.cpp"
```

More Examples:

===! "Plot"

[![example_fsurf_2](docs/examples/surfaces/fsurf/fsurf_2.png)](examples/surfaces/fsurf/fsurf_2.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fsurf/fsurf_2.cpp"
```

===! "Plot"

[![example_fsurf_3](docs/examples/surfaces/fsurf/fsurf_3.png)](examples/surfaces/fsurf/fsurf_3.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fsurf/fsurf_3.cpp"
```

===! "Plot"

[![example_fsurf_4](docs/examples/surfaces/fsurf/fsurf_4.png)](examples/surfaces/fsurf/fsurf_4.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fsurf/fsurf_4.cpp"
```

===! "Plot"

[![example_fsurf_5](docs/examples/surfaces/fsurf/fsurf_5.png)](examples/surfaces/fsurf/fsurf_5.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fsurf/fsurf_5.cpp"
```

===! "Plot"

[![example_fsurf_6](docs/examples/surfaces/fsurf/fsurf_6.png)](examples/surfaces/fsurf/fsurf_6.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fsurf/fsurf_6.cpp"
```

===! "Plot"

[![example_fsurf_7](docs/examples/surfaces/fsurf/fsurf_7.png)](examples/surfaces/fsurf/fsurf_7.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fsurf/fsurf_7.cpp"
```

===! "Plot"

[![example_fsurf_8](docs/examples/surfaces/fsurf/fsurf_8.png)](examples/surfaces/fsurf/fsurf_8.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fsurf/fsurf_8.cpp"
```

Function Mesh

fmesh(fn);
See result

example_fmesh_1

More Examples:

example_fmesh_2 example_fmesh_3 example_fmesh_4

===! "Plot"

[![example_fmesh_1](docs/examples/surfaces/fmesh/fmesh_1.png)](examples/surfaces/fmesh/fmesh_1.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fmesh/fmesh_1.cpp"
```

More Examples:

===! "Plot"

[![example_fmesh_2](docs/examples/surfaces/fmesh/fmesh_2.svg)](examples/surfaces/fmesh/fmesh_2.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fmesh/fmesh_2.cpp"
```

===! "Plot"

[![example_fmesh_3](docs/examples/surfaces/fmesh/fmesh_3.png)](examples/surfaces/fmesh/fmesh_3.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fmesh/fmesh_3.cpp"
```

===! "Plot"

[![example_fmesh_4](docs/examples/surfaces/fmesh/fmesh_4.png)](examples/surfaces/fmesh/fmesh_4.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fmesh/fmesh_4.cpp"
```

Waterfall

waterfall(X, Y, Z);
See result

example_waterfall_1

More Examples:

example_waterfall_2 example_waterfall_3

===! "Plot"

[![example_waterfall_1](docs/examples/surfaces/waterfall/waterfall_1.png)](examples/surfaces/waterfall/waterfall_1.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/waterfall/waterfall_1.cpp"
```

More Examples:

===! "Plot"

[![example_waterfall_2](docs/examples/surfaces/waterfall/waterfall_2.png)](examples/surfaces/waterfall/waterfall_2.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/waterfall/waterfall_2.cpp"
```

===! "Plot"

[![example_waterfall_3](docs/examples/surfaces/waterfall/waterfall_3.svg)](examples/surfaces/waterfall/waterfall_3.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/waterfall/waterfall_3.cpp"
```

Fence

fence(X, Y, Z);
See result

example_fence_1

More Examples:

example_fence_2 example_fence_3

===! "Plot"

[![example_fence_1](docs/examples/surfaces/fence/fence_1.png)](examples/surfaces/fence/fence_1.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fence/fence_1.cpp"
```

More Examples:

===! "Plot"

[![example_fence_2](docs/examples/surfaces/fence/fence_2.png)](examples/surfaces/fence/fence_2.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fence/fence_2.cpp"
```

===! "Plot"

[![example_fence_3](docs/examples/surfaces/fence/fence_3.png)](examples/surfaces/fence/fence_3.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/fence/fence_3.cpp"
```

Ribbon

ribbon(X, Y, Z);
See result

example_ribbon_1

More Examples:

example_ribbon_2 example_ribbon_3 example_ribbon_4

===! "Plot"

[![example_ribbon_1](docs/examples/surfaces/ribbon/ribbon_1.png)](examples/surfaces/ribbon/ribbon_1.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/ribbon/ribbon_1.cpp"
```

More Examples:

===! "Plot"

[![example_ribbon_2](docs/examples/surfaces/ribbon/ribbon_2.png)](examples/surfaces/ribbon/ribbon_2.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/ribbon/ribbon_2.cpp"
```

===! "Plot"

[![example_ribbon_3](docs/examples/surfaces/ribbon/ribbon_3.svg)](examples/surfaces/ribbon/ribbon_3.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/ribbon/ribbon_3.cpp"
```

===! "Plot"

[![example_ribbon_4](docs/examples/surfaces/ribbon/ribbon_4.png)](examples/surfaces/ribbon/ribbon_4.cpp)

=== "C++"

```cpp
--8<-- "examples/surfaces/ribbon/ribbon_4.cpp"
```

Graphs

Undirected Graph | Directed Graph

Undirected Graph

graph(edges);
See result

example_graph_1

More Examples:

example_graph_2 example_graph_3 example_graph_4 example_graph_5

===! "Plot"

[![example_graph_1](docs/examples/graphs/graph/graph_1.svg)](examples/graphs/graph/graph_1.cpp)

=== "C++"

```cpp
--8<-- "examples/graphs/graph/graph_1.cpp"
```

More Examples:

===! "Plot"

[![example_graph_2](docs/examples/graphs/graph/graph_2.svg)](examples/graphs/graph/graph_2.cpp)

=== "C++"

```cpp
--8<-- "examples/graphs/graph/graph_2.cpp"
```

===! "Plot"

[![example_graph_3](docs/examples/graphs/graph/graph_3.svg)](examples/graphs/graph/graph_3.cpp)

=== "C++"

```cpp
--8<-- "examples/graphs/graph/graph_3.cpp"
```

===! "Plot"

[![example_graph_4](docs/examples/graphs/graph/graph_4.svg)](examples/graphs/graph/graph_4.cpp)

=== "C++"

```cpp
--8<-- "examples/graphs/graph/graph_4.cpp"
```

===! "Plot"

[![example_graph_5](docs/examples/graphs/graph/graph_5.svg)](examples/graphs/graph/graph_5.cpp)

=== "C++"

```cpp
--8<-- "examples/graphs/graph/graph_5.cpp"
```

All these subcategories depend on the network class. Graphs are abstract structures that represent objects and relationships between these objects. The objects are represented as vertices and the relationships are depicted as edges.

In an abstract graph, the vertices have no specific position in space. Mathematically, a graph does not depend on its layout. However, the graph layout has a large impact on its understandability. The network class can calculate appropriate positions for graph vertices with several algorithms: Kamada Kawai algorithm, Fruchterman-Reingold algorithm, circle layout, random layout, and automatic layout.

The implementation of the Kamada Kawai and Fruchterman-Reingold algorithms depend on the NodeSoup library. The automatic layout uses the Kamada Kawai algorithm for small graphs and the Fruchterman-Reingold algorithm for larger graphs.

Directed Graph

digraph(edges);
See result

example_digraph_1

More Examples:

example_digraph_2 example_digraph_3

===! "Plot"

[![example_digraph_1](docs/examples/graphs/digraph/digraph_1.svg)](examples/graphs/digraph/digraph_1.cpp)

=== "C++"

```cpp
--8<-- "examples/graphs/digraph/digraph_1.cpp"
```

More Examples:

===! "Plot"

[![example_digraph_2](docs/examples/graphs/digraph/digraph_2.svg)](examples/graphs/digraph/digraph_2.cpp)

=== "C++"

```cpp
--8<-- "examples/graphs/digraph/digraph_2.cpp"
```

===! "Plot"

[![example_digraph_3](docs/examples/graphs/digraph/digraph_3.svg)](examples/graphs/digraph/digraph_3.cpp)

=== "C++"

```cpp
--8<-- "examples/graphs/digraph/digraph_3.cpp"
```

Images

Image Show | Image Matrix | Scaled Image

Image Show

imshow(image);
See result

example_imshow_1

More Examples:

example_imshow_2 example_imshow_3 example_imshow_4 example_imshow_5 example_imshow_6 example_imshow_7 example_imshow_8 example_imshow_9 example_imshow_10 example_imshow_11

===! "Plot"

[![example_imshow_1](docs/examples/images/imshow/imshow_1.png)](examples/images/imshow/imshow_1.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imshow/imshow_1.cpp"
```

More Examples:

===! "Plot"

[![example_imshow_2](docs/examples/images/imshow/imshow_2.png)](examples/images/imshow/imshow_2.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imshow/imshow_2.cpp"
```

===! "Plot"

[![example_imshow_3](docs/examples/images/imshow/imshow_3.svg)](examples/images/imshow/imshow_3.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imshow/imshow_3.cpp"
```

===! "Plot"

[![example_imshow_4](docs/examples/images/imshow/imshow_4.png)](examples/images/imshow/imshow_4.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imshow/imshow_4.cpp"
```

===! "Plot"

[![example_imshow_5](docs/examples/images/imshow/imshow_5.png)](examples/images/imshow/imshow_5.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imshow/imshow_5.cpp"
```

===! "Plot"

[![example_imshow_6](docs/examples/images/imshow/imshow_6.png)](examples/images/imshow/imshow_6.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imshow/imshow_6.cpp"
```

===! "Plot"

[![example_imshow_7](docs/examples/images/imshow/imshow_7.png)](examples/images/imshow/imshow_7.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imshow/imshow_7.cpp"
```

===! "Plot"

[![example_imshow_8](docs/examples/images/imshow/imshow_8.png)](examples/images/imshow/imshow_8.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imshow/imshow_8.cpp"
```

===! "Plot"

[![example_imshow_9](docs/examples/images/imshow/imshow_9.svg)](examples/images/imshow/imshow_9.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imshow/imshow_9.cpp"
```

===! "Plot"

[![example_imshow_10](docs/examples/images/imshow/imshow_10.svg)](examples/images/imshow/imshow_10.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imshow/imshow_10.cpp"
```

===! "Plot"

[![example_imshow_11](docs/examples/images/imshow/imshow_11.png)](examples/images/imshow/imshow_11.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imshow/imshow_11.cpp"
```

These subcategories depend on the matrix class. The matrix class can have up to four matrices. If it has only one matrix, it is represented with a colormap. If it has three matrices, they represent the red, green, and blue channels. If it has four matrices, the fourth matrix represents an alpha channel to control the transparency of each pixel.

We use the CImg library to load and save images. CImg can handle many common image formats as long as it has access to the appropriate libraries. The Matplot++ build script will look at compile-time for the following optional libraries: JPEG, TIFF, ZLIB, PNG, LAPACK, BLAS, OpenCV, X11, fftw3, OpenEXR, and Magick++. The build script will attempt to link all libraries from this list to Matplot++.

Matplot++ includes a few convenience functions to manipulate matrices with images: imread, rgb2gray, gray2rgb, imresize, and imwrite. All these functions work with lists of matrices.

Image Matrix

image(C);
See result

example_image_1

More Examples:

example_image_2 example_image_3 example_image_4 example_image_5

===! "Plot"

[![example_image_1](docs/examples/images/image/image_1.png)](examples/images/image/image_1.cpp)

=== "C++"

```cpp
--8<-- "examples/images/image/image_1.cpp"
```

More Examples:

===! "Plot"

[![example_image_2](docs/examples/images/image/image_2.png)](examples/images/image/image_2.cpp)

=== "C++"

```cpp
--8<-- "examples/images/image/image_2.cpp"
```

===! "Plot"

[![example_image_3](docs/examples/images/image/image_3.png)](examples/images/image/image_3.cpp)

=== "C++"

```cpp
--8<-- "examples/images/image/image_3.cpp"
```

===! "Plot"

[![example_image_4](docs/examples/images/image/image_4.png)](examples/images/image/image_4.cpp)

=== "C++"

```cpp
--8<-- "examples/images/image/image_4.cpp"
```

===! "Plot"

[![example_image_5](docs/examples/images/image/image_5.png)](examples/images/image/image_5.cpp)

=== "C++"

```cpp
--8<-- "examples/images/image/image_5.cpp"
```

Scaled Image

imagesc(C);
See result

example_imagesc_1

More Examples:

example_imagesc_2 example_imagesc_3 example_imagesc_4

===! "Plot"

[![example_imagesc_1](docs/examples/images/imagesc/imagesc_1.png)](examples/images/imagesc/imagesc_1.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imagesc/imagesc_1.cpp"
```

More Examples:

===! "Plot"

[![example_imagesc_2](docs/examples/images/imagesc/imagesc_2.png)](examples/images/imagesc/imagesc_2.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imagesc/imagesc_2.cpp"
```

===! "Plot"

[![example_imagesc_3](docs/examples/images/imagesc/imagesc_3.png)](examples/images/imagesc/imagesc_3.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imagesc/imagesc_3.cpp"
```

===! "Plot"

[![example_imagesc_4](docs/examples/images/imagesc/imagesc_4.png)](examples/images/imagesc/imagesc_4.cpp)

=== "C++"

```cpp
--8<-- "examples/images/imagesc/imagesc_4.cpp"
```

Annotations

Text | Text with Arrow | Rectangle | Filled Polygon | Ellipse | Textbox | Arrow | Line

Text

The annotations category is meant to create individual objects on the plot rather than representations of data sets. An important difference between the annotations category and other categories is that, by default, the annotations do not replace the plot that already exists in the axes object, even if the user does not call the hold function.

text(x0, y0, str);
See result

example_text_1

More Examples:

example_text_2 example_text_3 example_text_4 example_text_5 example_text_6 example_text_7 example_text_8

===! "Plot"

[![example_text_1](docs/examples/annotations/text/text_1.svg)](examples/annotations/text/text_1.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/text/text_1.cpp"
```

More Examples:

===! "Plot"

[![example_text_2](docs/examples/annotations/text/text_2.svg)](examples/annotations/text/text_2.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/text/text_2.cpp"
```

===! "Plot"

[![example_text_3](docs/examples/annotations/text/text_3.svg)](examples/annotations/text/text_3.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/text/text_3.cpp"
```

===! "Plot"

[![example_text_4](docs/examples/annotations/text/text_4.svg)](examples/annotations/text/text_4.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/text/text_4.cpp"
```

===! "Plot"

[![example_text_5](docs/examples/annotations/text/text_5.svg)](examples/annotations/text/text_5.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/text/text_5.cpp"
```

===! "Plot"

[![example_text_6](docs/examples/annotations/text/text_6.svg)](examples/annotations/text/text_6.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/text/text_6.cpp"
```

===! "Plot"

[![example_text_7](docs/examples/annotations/text/text_7.svg)](examples/annotations/text/text_7.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/text/text_7.cpp"
```

===! "Plot"

[![example_text_8](docs/examples/annotations/text/text_8.svg)](examples/annotations/text/text_8.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/text/text_8.cpp"
```

Text with Arrow

textarrow(x1, y1, x2, y2, str);
See result

example_textarrow_1

More Examples:

example_textarrow_2

===! "Plot"

[![example_textarrow_1](docs/examples/annotations/textarrow/textarrow_1.svg)](examples/annotations/textarrow/textarrow_1.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/textarrow/textarrow_1.cpp"
```

More Examples:

===! "Plot"

[![example_textarrow_2](docs/examples/annotations/textarrow/textarrow_2.svg)](examples/annotations/textarrow/textarrow_2.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/textarrow/textarrow_2.cpp"
```

Rectangle

rectangle(x, y, w, h);
See result

example_rectangle_1

More Examples:

example_rectangle_2 example_rectangle_3 example_rectangle_4 example_rectangle_5

===! "Plot"

[![example_rectangle_1](docs/examples/annotations/rectangle/rectangle_1.svg)](examples/annotations/rectangle/rectangle_1.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/rectangle/rectangle_1.cpp"
```

More Examples:

===! "Plot"

[![example_rectangle_2](docs/examples/annotations/rectangle/rectangle_2.png)](examples/annotations/rectangle/rectangle_2.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/rectangle/rectangle_2.cpp"
```

===! "Plot"

[![example_rectangle_3](docs/examples/annotations/rectangle/rectangle_3.svg)](examples/annotations/rectangle/rectangle_3.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/rectangle/rectangle_3.cpp"
```

===! "Plot"

[![example_rectangle_4](docs/examples/annotations/rectangle/rectangle_4.png)](examples/annotations/rectangle/rectangle_4.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/rectangle/rectangle_4.cpp"
```

===! "Plot"

[![example_rectangle_5](docs/examples/annotations/rectangle/rectangle_5.png)](examples/annotations/rectangle/rectangle_5.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/rectangle/rectangle_5.cpp"
```

The rectangle object can have a border curvature from to . We can also annotate with text, arrows, polygons, and lines.

Filled Polygon

polygon(x0, y0, color);
See result

example_fill_1

===! "Plot"

[![example_fill_1](docs/examples/annotations/fill/fill_1.svg)](examples/annotations/fill/fill_1.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/fill/fill_1.cpp"
```

Ellipse

ellipse(x, y, w, h);
See result

example_ellipse_1

===! "Plot"

[![example_ellipse_1](docs/examples/annotations/ellipse/ellipse_1.svg)](examples/annotations/ellipse/ellipse_1.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/ellipse/ellipse_1.cpp"
```

Textbox

textbox(x, y, w, h, str);
See result

example_textbox_1

===! "Plot"

[![example_textbox_1](docs/examples/annotations/textbox/textbox_1.svg)](examples/annotations/textbox/textbox_1.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/textbox/textbox_1.cpp"
```

Arrow

arrow(x1, y1, x2, y2);
See result

example_arrow_1

More Examples:

example_arrow_2

===! "Plot"

[![example_arrow_1](docs/examples/annotations/arrow/arrow_1.svg)](examples/annotations/arrow/arrow_1.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/arrow/arrow_1.cpp"
```

More Examples:

===! "Plot"

[![example_arrow_2](docs/examples/annotations/arrow/arrow_2.svg)](examples/annotations/arrow/arrow_2.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/arrow/arrow_2.cpp"
```

Line

line(x1, y1, x2, y2);
See result

example_line_1

===! "Plot"

[![example_line_1](docs/examples/annotations/line/line_1.svg)](examples/annotations/line/line_1.cpp)

=== "C++"

```cpp
--8<-- "examples/annotations/line/line_1.cpp"
```

Appearance

Labels

Title

title(str);
See result

example_title_1

More Examples:

example_title_2 example_title_3 example_title_4 example_title_5 example_title_6 example_title_7 example_title_8

===! "Plot"

[![example_title_1](docs/examples/appearance/labels/title/title_1.svg)](examples/appearance/labels/title/title_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/title/title_1.cpp"
```

More Examples:

===! "Plot"

[![example_title_2](docs/examples/appearance/labels/title/title_2.svg)](examples/appearance/labels/title/title_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/title/title_2.cpp"
```

===! "Plot"

[![example_title_3](docs/examples/appearance/labels/title/title_3.svg)](examples/appearance/labels/title/title_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/title/title_3.cpp"
```

===! "Plot"

[![example_title_4](docs/examples/appearance/labels/title/title_4.svg)](examples/appearance/labels/title/title_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/title/title_4.cpp"
```

===! "Plot"

[![example_title_5](docs/examples/appearance/labels/title/title_5.svg)](examples/appearance/labels/title/title_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/title/title_5.cpp"
```

===! "Plot"

[![example_title_6](docs/examples/appearance/labels/title/title_6.svg)](examples/appearance/labels/title/title_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/title/title_6.cpp"
```

===! "Plot"

[![example_title_7](docs/examples/appearance/labels/title/title_7.svg)](examples/appearance/labels/title/title_7.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/title/title_7.cpp"
```

===! "Plot"

[![example_title_8](docs/examples/appearance/labels/title/title_8.svg)](examples/appearance/labels/title/title_8.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/title/title_8.cpp"
```

Subplot Title

sgtitle(str);
See result

example_sgtitle_1

More Examples:

example_sgtitle_2

===! "Plot"

[![example_sgtitle_1](docs/examples/appearance/labels/sgtitle/sgtitle_1.png)](examples/appearance/labels/sgtitle/sgtitle_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/sgtitle/sgtitle_1.cpp"
```

More Examples:

===! "Plot"

[![example_sgtitle_2](docs/examples/appearance/labels/sgtitle/sgtitle_2.svg)](examples/appearance/labels/sgtitle/sgtitle_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/sgtitle/sgtitle_2.cpp"
```

X Label

xlabel(str);
See result

example_xlabel_1

More Examples:

example_xlabel_2 example_xlabel_3 example_xlabel_4 example_xlabel_5 example_xlabel_6 example_xlabel_7 example_xlabel_8

===! "Plot"

[![example_xlabel_1](docs/examples/appearance/labels/xlabel/xlabel_1.svg)](examples/appearance/labels/xlabel/xlabel_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/xlabel/xlabel_1.cpp"
```

More Examples:

===! "Plot"

[![example_xlabel_2](docs/examples/appearance/labels/xlabel/xlabel_2.svg)](examples/appearance/labels/xlabel/xlabel_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/xlabel/xlabel_2.cpp"
```

===! "Plot"

[![example_xlabel_3](docs/examples/appearance/labels/xlabel/xlabel_3.svg)](examples/appearance/labels/xlabel/xlabel_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/xlabel/xlabel_3.cpp"
```

===! "Plot"

[![example_xlabel_4](docs/examples/appearance/labels/xlabel/xlabel_4.svg)](examples/appearance/labels/xlabel/xlabel_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/xlabel/xlabel_4.cpp"
```

===! "Plot"

[![example_xlabel_5](docs/examples/appearance/labels/xlabel/xlabel_5.svg)](examples/appearance/labels/xlabel/xlabel_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/xlabel/xlabel_5.cpp"
```

===! "Plot"

[![example_xlabel_6](docs/examples/appearance/labels/xlabel/xlabel_6.svg)](examples/appearance/labels/xlabel/xlabel_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/xlabel/xlabel_6.cpp"
```

===! "Plot"

[![example_xlabel_7](docs/examples/appearance/labels/xlabel/xlabel_7.svg)](examples/appearance/labels/xlabel/xlabel_7.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/xlabel/xlabel_7.cpp"
```

===! "Plot"

[![example_xlabel_8](docs/examples/appearance/labels/xlabel/xlabel_8.svg)](examples/appearance/labels/xlabel/xlabel_8.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/xlabel/xlabel_8.cpp"
```

Y Label

ylabel(str);
See result

example_ylabel_1

More Examples:

example_ylabel_2 example_ylabel_3 example_ylabel_4 example_ylabel_5 example_ylabel_6 example_ylabel_7 example_ylabel_8

===! "Plot"

[![example_ylabel_1](docs/examples/appearance/labels/ylabel/ylabel_1.svg)](examples/appearance/labels/ylabel/ylabel_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/ylabel/ylabel_1.cpp"
```

More Examples:

===! "Plot"

[![example_ylabel_2](docs/examples/appearance/labels/ylabel/ylabel_2.svg)](examples/appearance/labels/ylabel/ylabel_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/ylabel/ylabel_2.cpp"
```

===! "Plot"

[![example_ylabel_3](docs/examples/appearance/labels/ylabel/ylabel_3.svg)](examples/appearance/labels/ylabel/ylabel_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/ylabel/ylabel_3.cpp"
```

===! "Plot"

[![example_ylabel_4](docs/examples/appearance/labels/ylabel/ylabel_4.svg)](examples/appearance/labels/ylabel/ylabel_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/ylabel/ylabel_4.cpp"
```

===! "Plot"

[![example_ylabel_5](docs/examples/appearance/labels/ylabel/ylabel_5.svg)](examples/appearance/labels/ylabel/ylabel_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/ylabel/ylabel_5.cpp"
```

===! "Plot"

[![example_ylabel_6](docs/examples/appearance/labels/ylabel/ylabel_6.svg)](examples/appearance/labels/ylabel/ylabel_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/ylabel/ylabel_6.cpp"
```

===! "Plot"

[![example_ylabel_7](docs/examples/appearance/labels/ylabel/ylabel_7.svg)](examples/appearance/labels/ylabel/ylabel_7.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/ylabel/ylabel_7.cpp"
```

===! "Plot"

[![example_ylabel_8](docs/examples/appearance/labels/ylabel/ylabel_8.svg)](examples/appearance/labels/ylabel/ylabel_8.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/ylabel/ylabel_8.cpp"
```

Z Label

zlabel(str);
See result

example_zlabel_1

More Examples:

example_zlabel_2 example_zlabel_3

===! "Plot"

[![example_zlabel_1](docs/examples/appearance/labels/zlabel/zlabel_1.png)](examples/appearance/labels/zlabel/zlabel_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/zlabel/zlabel_1.cpp"
```

More Examples:

===! "Plot"

[![example_zlabel_2](docs/examples/appearance/labels/zlabel/zlabel_2.png)](examples/appearance/labels/zlabel/zlabel_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/zlabel/zlabel_2.cpp"
```

===! "Plot"

[![example_zlabel_3](docs/examples/appearance/labels/zlabel/zlabel_3.png)](examples/appearance/labels/zlabel/zlabel_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/zlabel/zlabel_3.cpp"
```

Legend

legend({str1,str2,str3});
See result

example_legend_1

More Examples:

example_legend_2 example_legend_3 example_legend_4 example_legend_5 example_legend_6 example_legend_7 example_legend_8

===! "Plot"

[![example_legend_1](docs/examples/appearance/labels/legend/legend_1.svg)](examples/appearance/labels/legend/legend_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/legend/legend_1.cpp"
```

More Examples:

===! "Plot"

[![example_legend_2](docs/examples/appearance/labels/legend/legend_2.svg)](examples/appearance/labels/legend/legend_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/legend/legend_2.cpp"
```

===! "Plot"

[![example_legend_3](docs/examples/appearance/labels/legend/legend_3.svg)](examples/appearance/labels/legend/legend_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/legend/legend_3.cpp"
```

===! "Plot"

[![example_legend_4](docs/examples/appearance/labels/legend/legend_4.svg)](examples/appearance/labels/legend/legend_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/legend/legend_4.cpp"
```

===! "Plot"

[![example_legend_5](docs/examples/appearance/labels/legend/legend_5.svg)](examples/appearance/labels/legend/legend_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/legend/legend_5.cpp"
```

===! "Plot"

[![example_legend_6](docs/examples/appearance/labels/legend/legend_6.svg)](examples/appearance/labels/legend/legend_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/legend/legend_6.cpp"
```

===! "Plot"

[![example_legend_7](docs/examples/appearance/labels/legend/legend_7.svg)](examples/appearance/labels/legend/legend_7.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/legend/legend_7.cpp"
```

===! "Plot"

[![example_legend_8](docs/examples/appearance/labels/legend/legend_8.svg)](examples/appearance/labels/legend/legend_8.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/labels/legend/legend_8.cpp"
```

Axis

X Limits

xlim({xmin,xmax});
See result

example_xlim_1

More Examples:

example_xlim_2 example_xlim_3 example_xlim_4 example_xlim_5 example_xlim_6

===! "Plot"

[![example_xlim_1](docs/examples/appearance/axis/xlim/xlim_1.svg)](examples/appearance/axis/xlim/xlim_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/xlim/xlim_1.cpp"
```

More Examples:

===! "Plot"

[![example_xlim_2](docs/examples/appearance/axis/xlim/xlim_2.png)](examples/appearance/axis/xlim/xlim_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/xlim/xlim_2.cpp"
```

===! "Plot"

[![example_xlim_3](docs/examples/appearance/axis/xlim/xlim_3.svg)](examples/appearance/axis/xlim/xlim_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/xlim/xlim_3.cpp"
```

===! "Plot"

[![example_xlim_4](docs/examples/appearance/axis/xlim/xlim_4.svg)](examples/appearance/axis/xlim/xlim_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/xlim/xlim_4.cpp"
```

===! "Plot"

[![example_xlim_5](docs/examples/appearance/axis/xlim/xlim_5.svg)](examples/appearance/axis/xlim/xlim_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/xlim/xlim_5.cpp"
```

===! "Plot"

[![example_xlim_6](docs/examples/appearance/axis/xlim/xlim_6.svg)](examples/appearance/axis/xlim/xlim_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/xlim/xlim_6.cpp"
```

Y Limits

ylim({ymin,ymax});
See result

example_ylim_1

More Examples:

example_ylim_2 example_ylim_3 example_ylim_4 example_ylim_5 example_ylim_6

===! "Plot"

[![example_ylim_1](docs/examples/appearance/axis/ylim/ylim_1.svg)](examples/appearance/axis/ylim/ylim_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/ylim/ylim_1.cpp"
```

More Examples:

===! "Plot"

[![example_ylim_2](docs/examples/appearance/axis/ylim/ylim_2.png)](examples/appearance/axis/ylim/ylim_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/ylim/ylim_2.cpp"
```

===! "Plot"

[![example_ylim_3](docs/examples/appearance/axis/ylim/ylim_3.svg)](examples/appearance/axis/ylim/ylim_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/ylim/ylim_3.cpp"
```

===! "Plot"

[![example_ylim_4](docs/examples/appearance/axis/ylim/ylim_4.svg)](examples/appearance/axis/ylim/ylim_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/ylim/ylim_4.cpp"
```

===! "Plot"

[![example_ylim_5](docs/examples/appearance/axis/ylim/ylim_5.svg)](examples/appearance/axis/ylim/ylim_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/ylim/ylim_5.cpp"
```

===! "Plot"

[![example_ylim_6](docs/examples/appearance/axis/ylim/ylim_6.svg)](examples/appearance/axis/ylim/ylim_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/ylim/ylim_6.cpp"
```

Z Limits

zlim({zmin,zmax});
See result

example_zlim_1

More Examples:

example_zlim_2 example_zlim_3 example_zlim_4 example_zlim_5 example_zlim_6

===! "Plot"

[![example_zlim_1](docs/examples/appearance/axis/zlim/zlim_1.png)](examples/appearance/axis/zlim/zlim_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/zlim/zlim_1.cpp"
```

More Examples:

===! "Plot"

[![example_zlim_2](docs/examples/appearance/axis/zlim/zlim_2.png)](examples/appearance/axis/zlim/zlim_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/zlim/zlim_2.cpp"
```

===! "Plot"

[![example_zlim_3](docs/examples/appearance/axis/zlim/zlim_3.png)](examples/appearance/axis/zlim/zlim_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/zlim/zlim_3.cpp"
```

===! "Plot"

[![example_zlim_4](docs/examples/appearance/axis/zlim/zlim_4.svg)](examples/appearance/axis/zlim/zlim_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/zlim/zlim_4.cpp"
```

===! "Plot"

[![example_zlim_5](docs/examples/appearance/axis/zlim/zlim_5.svg)](examples/appearance/axis/zlim/zlim_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/zlim/zlim_5.cpp"
```

===! "Plot"

[![example_zlim_6](docs/examples/appearance/axis/zlim/zlim_6.svg)](examples/appearance/axis/zlim/zlim_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/zlim/zlim_6.cpp"
```

Adjust Axis

axis({xmin, xmax, ymin, ymax});
See result

example_axis_1

More Examples:

example_axis_2 example_axis_3 example_axis_4 example_axis_5 example_axis_6 example_axis_7 example_axis_8

===! "Plot"

[![example_axis_1](docs/examples/appearance/axis/axis/axis_1.svg)](examples/appearance/axis/axis/axis_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/axis/axis_1.cpp"
```

More Examples:

===! "Plot"

[![example_axis_2](docs/examples/appearance/axis/axis/axis_2.svg)](examples/appearance/axis/axis/axis_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/axis/axis_2.cpp"
```

===! "Plot"

[![example_axis_3](docs/examples/appearance/axis/axis/axis_3.svg)](examples/appearance/axis/axis/axis_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/axis/axis_3.cpp"
```

===! "Plot"

[![example_axis_4](docs/examples/appearance/axis/axis/axis_4.png)](examples/appearance/axis/axis/axis_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/axis/axis_4.cpp"
```

===! "Plot"

[![example_axis_5](docs/examples/appearance/axis/axis/axis_5.png)](examples/appearance/axis/axis/axis_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/axis/axis_5.cpp"
```

===! "Plot"

[![example_axis_6](docs/examples/appearance/axis/axis/axis_6.png)](examples/appearance/axis/axis/axis_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/axis/axis_6.cpp"
```

===! "Plot"

[![example_axis_7](docs/examples/appearance/axis/axis/axis_7.svg)](examples/appearance/axis/axis/axis_7.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/axis/axis_7.cpp"
```

===! "Plot"

[![example_axis_8](docs/examples/appearance/axis/axis/axis_8.svg)](examples/appearance/axis/axis/axis_8.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/axis/axis_8.cpp"
```

Box

box(on);
See result

example_box_1

More Examples:

example_box_2 example_box_3

===! "Plot"

[![example_box_1](docs/examples/appearance/axis/box/box_1.png)](examples/appearance/axis/box/box_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/box/box_1.cpp"
```

More Examples:

===! "Plot"

[![example_box_2](docs/examples/appearance/axis/box/box_2.png)](examples/appearance/axis/box/box_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/box/box_2.cpp"
```

===! "Plot"

[![example_box_3](docs/examples/appearance/axis/box/box_3.svg)](examples/appearance/axis/box/box_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axis/box/box_3.cpp"
```

Grid

Grid Background

grid(on);
See result

example_grid_1

More Examples:

example_grid_2 example_grid_3 example_grid_4

===! "Plot"

[![example_grid_1](docs/examples/appearance/grid/grid/grid_1.svg)](examples/appearance/grid/grid/grid_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/grid/grid_1.cpp"
```

More Examples:

===! "Plot"

[![example_grid_2](docs/examples/appearance/grid/grid/grid_2.png)](examples/appearance/grid/grid/grid_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/grid/grid_2.cpp"
```

===! "Plot"

[![example_grid_3](docs/examples/appearance/grid/grid/grid_3.svg)](examples/appearance/grid/grid/grid_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/grid/grid_3.cpp"
```

===! "Plot"

[![example_grid_4](docs/examples/appearance/grid/grid/grid_4.svg)](examples/appearance/grid/grid/grid_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/grid/grid_4.cpp"
```

X Ticks

xticks(xs);
See result

example_xticks_1

More Examples:

example_xticks_2 example_xticks_3 example_xticks_4 example_xticks_5 example_xticks_6 example_xticks_7 example_xticks_8

===! "Plot"

[![example_xticks_1](docs/examples/appearance/grid/xticks/xticks_1.svg)](examples/appearance/grid/xticks/xticks_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xticks/xticks_1.cpp"
```

More Examples:

===! "Plot"

[![example_xticks_2](docs/examples/appearance/grid/xticks/xticks_2.svg)](examples/appearance/grid/xticks/xticks_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xticks/xticks_2.cpp"
```

===! "Plot"

[![example_xticks_3](docs/examples/appearance/grid/xticks/xticks_3.svg)](examples/appearance/grid/xticks/xticks_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xticks/xticks_3.cpp"
```

===! "Plot"

[![example_xticks_4](docs/examples/appearance/grid/xticks/xticks_4.svg)](examples/appearance/grid/xticks/xticks_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xticks/xticks_4.cpp"
```

===! "Plot"

[![example_xticks_5](docs/examples/appearance/grid/xticks/xticks_5.svg)](examples/appearance/grid/xticks/xticks_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xticks/xticks_5.cpp"
```

===! "Plot"

[![example_xticks_6](docs/examples/appearance/grid/xticks/xticks_6.svg)](examples/appearance/grid/xticks/xticks_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xticks/xticks_6.cpp"
```

===! "Plot"

[![example_xticks_7](docs/examples/appearance/grid/xticks/xticks_7.svg)](examples/appearance/grid/xticks/xticks_7.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xticks/xticks_7.cpp"
```

===! "Plot"

[![example_xticks_8](docs/examples/appearance/grid/xticks/xticks_8.svg)](examples/appearance/grid/xticks/xticks_8.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xticks/xticks_8.cpp"
```

Y Ticks

yticks(ys);
See result

example_yticks_1

More Examples:

example_yticks_2 example_yticks_3 example_yticks_4 example_yticks_5 example_yticks_6 example_yticks_7 example_yticks_8

===! "Plot"

[![example_yticks_1](docs/examples/appearance/grid/yticks/yticks_1.svg)](examples/appearance/grid/yticks/yticks_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/yticks/yticks_1.cpp"
```

More Examples:

===! "Plot"

[![example_yticks_2](docs/examples/appearance/grid/yticks/yticks_2.svg)](examples/appearance/grid/yticks/yticks_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/yticks/yticks_2.cpp"
```

===! "Plot"

[![example_yticks_3](docs/examples/appearance/grid/yticks/yticks_3.svg)](examples/appearance/grid/yticks/yticks_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/yticks/yticks_3.cpp"
```

===! "Plot"

[![example_yticks_4](docs/examples/appearance/grid/yticks/yticks_4.svg)](examples/appearance/grid/yticks/yticks_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/yticks/yticks_4.cpp"
```

===! "Plot"

[![example_yticks_5](docs/examples/appearance/grid/yticks/yticks_5.svg)](examples/appearance/grid/yticks/yticks_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/yticks/yticks_5.cpp"
```

===! "Plot"

[![example_yticks_6](docs/examples/appearance/grid/yticks/yticks_6.svg)](examples/appearance/grid/yticks/yticks_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/yticks/yticks_6.cpp"
```

===! "Plot"

[![example_yticks_7](docs/examples/appearance/grid/yticks/yticks_7.svg)](examples/appearance/grid/yticks/yticks_7.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/yticks/yticks_7.cpp"
```

===! "Plot"

[![example_yticks_8](docs/examples/appearance/grid/yticks/yticks_8.svg)](examples/appearance/grid/yticks/yticks_8.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/yticks/yticks_8.cpp"
```

Z Ticks

zticks(zs);
See result

example_zticks_1

More Examples:

example_zticks_2 example_zticks_3 example_zticks_4 example_zticks_5 example_zticks_6

===! "Plot"

[![example_zticks_1](docs/examples/appearance/grid/zticks/zticks_1.png)](examples/appearance/grid/zticks/zticks_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/zticks/zticks_1.cpp"
```

More Examples:

===! "Plot"

[![example_zticks_2](docs/examples/appearance/grid/zticks/zticks_2.png)](examples/appearance/grid/zticks/zticks_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/zticks/zticks_2.cpp"
```

===! "Plot"

[![example_zticks_3](docs/examples/appearance/grid/zticks/zticks_3.png)](examples/appearance/grid/zticks/zticks_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/zticks/zticks_3.cpp"
```

===! "Plot"

[![example_zticks_4](docs/examples/appearance/grid/zticks/zticks_4.svg)](examples/appearance/grid/zticks/zticks_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/zticks/zticks_4.cpp"
```

===! "Plot"

[![example_zticks_5](docs/examples/appearance/grid/zticks/zticks_5.svg)](examples/appearance/grid/zticks/zticks_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/zticks/zticks_5.cpp"
```

===! "Plot"

[![example_zticks_6](docs/examples/appearance/grid/zticks/zticks_6.png)](examples/appearance/grid/zticks/zticks_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/zticks/zticks_6.cpp"
```

X Tick Labels

xticklabels(xstrs);
See result

example_xticklabels_1

More Examples:

example_xticklabels_2 example_xticklabels_3 example_xticklabels_4

===! "Plot"

[![example_xticklabels_1](docs/examples/appearance/grid/xticklabels/xticklabels_1.svg)](examples/appearance/grid/xticklabels/xticklabels_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xticklabels/xticklabels_1.cpp"
```

More Examples:

===! "Plot"

[![example_xticklabels_2](docs/examples/appearance/grid/xticklabels/xticklabels_2.svg)](examples/appearance/grid/xticklabels/xticklabels_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xticklabels/xticklabels_2.cpp"
```

===! "Plot"

[![example_xticklabels_3](docs/examples/appearance/grid/xticklabels/xticklabels_3.svg)](examples/appearance/grid/xticklabels/xticklabels_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xticklabels/xticklabels_3.cpp"
```

===! "Plot"

[![example_xticklabels_4](docs/examples/appearance/grid/xticklabels/xticklabels_4.svg)](examples/appearance/grid/xticklabels/xticklabels_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xticklabels/xticklabels_4.cpp"
```

Y Tick Labels

yticklabels(ystrs);
See result

example_yticklabels_1

More Examples:

example_yticklabels_2 example_yticklabels_3 example_yticklabels_4

===! "Plot"

[![example_yticklabels_1](docs/examples/appearance/grid/yticklabels/yticklabels_1.svg)](examples/appearance/grid/yticklabels/yticklabels_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/yticklabels/yticklabels_1.cpp"
```

More Examples:

===! "Plot"

[![example_yticklabels_2](docs/examples/appearance/grid/yticklabels/yticklabels_2.svg)](examples/appearance/grid/yticklabels/yticklabels_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/yticklabels/yticklabels_2.cpp"
```

===! "Plot"

[![example_yticklabels_3](docs/examples/appearance/grid/yticklabels/yticklabels_3.svg)](examples/appearance/grid/yticklabels/yticklabels_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/yticklabels/yticklabels_3.cpp"
```

===! "Plot"

[![example_yticklabels_4](docs/examples/appearance/grid/yticklabels/yticklabels_4.svg)](examples/appearance/grid/yticklabels/yticklabels_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/yticklabels/yticklabels_4.cpp"
```

X Tick Format

xtickformat(fmtstr);
See result

example_xtickformat_1

More Examples:

example_xtickformat_2 example_xtickformat_3 example_xtickformat_4 example_xtickformat_5

===! "Plot"

[![example_xtickformat_1](docs/examples/appearance/grid/xtickformat/xtickformat_1.svg)](examples/appearance/grid/xtickformat/xtickformat_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xtickformat/xtickformat_1.cpp"
```

More Examples:

===! "Plot"

[![example_xtickformat_2](docs/examples/appearance/grid/xtickformat/xtickformat_2.svg)](examples/appearance/grid/xtickformat/xtickformat_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xtickformat/xtickformat_2.cpp"
```

===! "Plot"

[![example_xtickformat_3](docs/examples/appearance/grid/xtickformat/xtickformat_3.svg)](examples/appearance/grid/xtickformat/xtickformat_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xtickformat/xtickformat_3.cpp"
```

===! "Plot"

[![example_xtickformat_4](docs/examples/appearance/grid/xtickformat/xtickformat_4.svg)](examples/appearance/grid/xtickformat/xtickformat_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xtickformat/xtickformat_4.cpp"
```

===! "Plot"

[![example_xtickformat_5](docs/examples/appearance/grid/xtickformat/xtickformat_5.svg)](examples/appearance/grid/xtickformat/xtickformat_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xtickformat/xtickformat_5.cpp"
```

Y Tick Format

ytickformat(fmtstr);
See result

example_ytickformat_1

More Examples:

example_ytickformat_2 example_ytickformat_3 example_ytickformat_4 example_ytickformat_5

===! "Plot"

[![example_ytickformat_1](docs/examples/appearance/grid/ytickformat/ytickformat_1.svg)](examples/appearance/grid/ytickformat/ytickformat_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/ytickformat/ytickformat_1.cpp"
```

More Examples:

===! "Plot"

[![example_ytickformat_2](docs/examples/appearance/grid/ytickformat/ytickformat_2.svg)](examples/appearance/grid/ytickformat/ytickformat_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/ytickformat/ytickformat_2.cpp"
```

===! "Plot"

[![example_ytickformat_3](docs/examples/appearance/grid/ytickformat/ytickformat_3.svg)](examples/appearance/grid/ytickformat/ytickformat_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/ytickformat/ytickformat_3.cpp"
```

===! "Plot"

[![example_ytickformat_4](docs/examples/appearance/grid/ytickformat/ytickformat_4.svg)](examples/appearance/grid/ytickformat/ytickformat_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/ytickformat/ytickformat_4.cpp"
```

===! "Plot"

[![example_ytickformat_5](docs/examples/appearance/grid/ytickformat/ytickformat_5.svg)](examples/appearance/grid/ytickformat/ytickformat_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/ytickformat/ytickformat_5.cpp"
```

Z Tick Format

ztickformat(fmtstr);
See result

example_ztickformat_1

More Examples:

example_ztickformat_2 example_ztickformat_3 example_ztickformat_4 example_ztickformat_5

===! "Plot"

[![example_ztickformat_1](docs/examples/appearance/grid/ztickformat/ztickformat_1.svg)](examples/appearance/grid/ztickformat/ztickformat_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/ztickformat/ztickformat_1.cpp"
```

More Examples:

===! "Plot"

[![example_ztickformat_2](docs/examples/appearance/grid/ztickformat/ztickformat_2.svg)](examples/appearance/grid/ztickformat/ztickformat_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/ztickformat/ztickformat_2.cpp"
```

===! "Plot"

[![example_ztickformat_3](docs/examples/appearance/grid/ztickformat/ztickformat_3.svg)](examples/appearance/grid/ztickformat/ztickformat_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/ztickformat/ztickformat_3.cpp"
```

===! "Plot"

[![example_ztickformat_4](docs/examples/appearance/grid/ztickformat/ztickformat_4.svg)](examples/appearance/grid/ztickformat/ztickformat_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/ztickformat/ztickformat_4.cpp"
```

===! "Plot"

[![example_ztickformat_5](docs/examples/appearance/grid/ztickformat/ztickformat_5.svg)](examples/appearance/grid/ztickformat/ztickformat_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/ztickformat/ztickformat_5.cpp"
```

X Tick Angle

xtickangle(ang);
See result

example_xtickangle_1

More Examples:

example_xtickangle_2 example_xtickangle_3

===! "Plot"

[![example_xtickangle_1](docs/examples/appearance/grid/xtickangle/xtickangle_1.svg)](examples/appearance/grid/xtickangle/xtickangle_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xtickangle/xtickangle_1.cpp"
```

More Examples:

===! "Plot"

[![example_xtickangle_2](docs/examples/appearance/grid/xtickangle/xtickangle_2.svg)](examples/appearance/grid/xtickangle/xtickangle_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xtickangle/xtickangle_2.cpp"
```

===! "Plot"

[![example_xtickangle_3](docs/examples/appearance/grid/xtickangle/xtickangle_3.svg)](examples/appearance/grid/xtickangle/xtickangle_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/xtickangle/xtickangle_3.cpp"
```

Y Tick Angle

ytickangle(ang);
See result

example_ytickangle_1

More Examples:

example_ytickangle_2 example_ytickangle_3

===! "Plot"

[![example_ytickangle_1](docs/examples/appearance/grid/ytickangle/ytickangle_1.svg)](examples/appearance/grid/ytickangle/ytickangle_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/ytickangle/ytickangle_1.cpp"
```

More Examples:

===! "Plot"

[![example_ytickangle_2](docs/examples/appearance/grid/ytickangle/ytickangle_2.svg)](examples/appearance/grid/ytickangle/ytickangle_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/ytickangle/ytickangle_2.cpp"
```

===! "Plot"

[![example_ytickangle_3](docs/examples/appearance/grid/ytickangle/ytickangle_3.svg)](examples/appearance/grid/ytickangle/ytickangle_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/grid/ytickangle/ytickangle_3.cpp"
```

Multiplot

Hold

hold(on);
See result

example_hold_1

More Examples:

example_hold_2 example_hold_3 example_hold_4

===! "Plot"

[![example_hold_1](docs/examples/appearance/multiplot/hold/hold_1.svg)](examples/appearance/multiplot/hold/hold_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/hold/hold_1.cpp"
```

More Examples:

===! "Plot"

[![example_hold_2](docs/examples/appearance/multiplot/hold/hold_2.svg)](examples/appearance/multiplot/hold/hold_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/hold/hold_2.cpp"
```

===! "Plot"

[![example_hold_3](docs/examples/appearance/multiplot/hold/hold_3.svg)](examples/appearance/multiplot/hold/hold_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/hold/hold_3.cpp"
```

===! "Plot"

[![example_hold_4](docs/examples/appearance/multiplot/hold/hold_4.svg)](examples/appearance/multiplot/hold/hold_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/hold/hold_4.cpp"
```

YY-axis

plot(x, y)->use_y2(true);
See result

example_yyaxis_1

More Examples:

example_yyaxis_2 example_yyaxis_3 example_yyaxis_4 example_yyaxis_5 example_yyaxis_6

===! "Plot"

[![example_yyaxis_1](docs/examples/appearance/multiplot/yyaxis/yyaxis_1.svg)](examples/appearance/multiplot/yyaxis/yyaxis_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/yyaxis/yyaxis_1.cpp"
```

More Examples:

===! "Plot"

[![example_yyaxis_2](docs/examples/appearance/multiplot/yyaxis/yyaxis_2.svg)](examples/appearance/multiplot/yyaxis/yyaxis_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/yyaxis/yyaxis_2.cpp"
```

===! "Plot"

[![example_yyaxis_3](docs/examples/appearance/multiplot/yyaxis/yyaxis_3.svg)](examples/appearance/multiplot/yyaxis/yyaxis_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/yyaxis/yyaxis_3.cpp"
```

===! "Plot"

[![example_yyaxis_4](docs/examples/appearance/multiplot/yyaxis/yyaxis_4.svg)](examples/appearance/multiplot/yyaxis/yyaxis_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/yyaxis/yyaxis_4.cpp"
```

===! "Plot"

[![example_yyaxis_5](docs/examples/appearance/multiplot/yyaxis/yyaxis_5.svg)](examples/appearance/multiplot/yyaxis/yyaxis_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/yyaxis/yyaxis_5.cpp"
```

===! "Plot"

[![example_yyaxis_6](docs/examples/appearance/multiplot/yyaxis/yyaxis_6.svg)](examples/appearance/multiplot/yyaxis/yyaxis_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/yyaxis/yyaxis_6.cpp"
```

Color Order

colororder(colors);
See result

example_colororder_1

More Examples:

example_colororder_2 example_colororder_3 example_colororder_4 example_colororder_5 example_colororder_6 example_colororder_7

===! "Plot"

[![example_colororder_1](docs/examples/appearance/multiplot/colororder/colororder_1.svg)](examples/appearance/multiplot/colororder/colororder_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/colororder/colororder_1.cpp"
```

More Examples:

===! "Plot"

[![example_colororder_2](docs/examples/appearance/multiplot/colororder/colororder_2.svg)](examples/appearance/multiplot/colororder/colororder_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/colororder/colororder_2.cpp"
```

===! "Plot"

[![example_colororder_3](docs/examples/appearance/multiplot/colororder/colororder_3.png)](examples/appearance/multiplot/colororder/colororder_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/colororder/colororder_3.cpp"
```

===! "Plot"

[![example_colororder_4](docs/examples/appearance/multiplot/colororder/colororder_4.svg)](examples/appearance/multiplot/colororder/colororder_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/colororder/colororder_4.cpp"
```

===! "Plot"

[![example_colororder_5](docs/examples/appearance/multiplot/colororder/colororder_5.svg)](examples/appearance/multiplot/colororder/colororder_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/colororder/colororder_5.cpp"
```

===! "Plot"

[![example_colororder_6](docs/examples/appearance/multiplot/colororder/colororder_6.svg)](examples/appearance/multiplot/colororder/colororder_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/colororder/colororder_6.cpp"
```

===! "Plot"

[![example_colororder_7](docs/examples/appearance/multiplot/colororder/colororder_7.svg)](examples/appearance/multiplot/colororder/colororder_7.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/colororder/colororder_7.cpp"
```

Subplots

subplot(rows, cols, id);

Unlike other libraries, subplots uses 0-based indices.

See result

example_subplot_1

More Examples:

example_subplot_2 example_subplot_3 example_subplot_4 example_subplot_5 example_subplot_6 example_subplot_7 example_subplot_8 example_subplot_9 example_subplot_10 example_subplot_11 example_subplot_12 example_subplot_13

===! "Plot"

[![example_subplot_1](docs/examples/appearance/multiplot/subplot/subplot_1.svg)](examples/appearance/multiplot/subplot/subplot_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/subplot/subplot_1.cpp"
```

More Examples:

===! "Plot"

[![example_subplot_2](docs/examples/appearance/multiplot/subplot/subplot_2.svg)](examples/appearance/multiplot/subplot/subplot_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/subplot/subplot_2.cpp"
```

===! "Plot"

[![example_subplot_3](docs/examples/appearance/multiplot/subplot/subplot_3.svg)](examples/appearance/multiplot/subplot/subplot_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/subplot/subplot_3.cpp"
```

===! "Plot"

[![example_subplot_4](docs/examples/appearance/multiplot/subplot/subplot_4.svg)](examples/appearance/multiplot/subplot/subplot_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/subplot/subplot_4.cpp"
```

===! "Plot"

[![example_subplot_5](docs/examples/appearance/multiplot/subplot/subplot_5.svg)](examples/appearance/multiplot/subplot/subplot_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/subplot/subplot_5.cpp"
```

===! "Plot"

[![example_subplot_6](docs/examples/appearance/multiplot/subplot/subplot_6.svg)](examples/appearance/multiplot/subplot/subplot_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/subplot/subplot_6.cpp"
```

===! "Plot"

[![example_subplot_7](docs/examples/appearance/multiplot/subplot/subplot_7.svg)](examples/appearance/multiplot/subplot/subplot_7.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/subplot/subplot_7.cpp"
```

===! "Plot"

[![example_subplot_8](docs/examples/appearance/multiplot/subplot/subplot_8.svg)](examples/appearance/multiplot/subplot/subplot_8.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/subplot/subplot_8.cpp"
```

===! "Plot"

[![example_subplot_9](docs/examples/appearance/multiplot/subplot/subplot_9.svg)](examples/appearance/multiplot/subplot/subplot_9.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/subplot/subplot_9.cpp"
```

===! "Plot"

[![example_subplot_10](docs/examples/appearance/multiplot/subplot/subplot_10.png)](examples/appearance/multiplot/subplot/subplot_10.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/subplot/subplot_10.cpp"
```

===! "Plot"

[![example_subplot_11](docs/examples/appearance/multiplot/subplot/subplot_11.svg)](examples/appearance/multiplot/subplot/subplot_11.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/subplot/subplot_11.cpp"
```

===! "Plot"

[![example_subplot_12](docs/examples/appearance/multiplot/subplot/subplot_12.svg)](examples/appearance/multiplot/subplot/subplot_12.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/subplot/subplot_12.cpp"
```

===! "Plot"

[![example_subplot_13](docs/examples/appearance/multiplot/subplot/subplot_13.svg)](examples/appearance/multiplot/subplot/subplot_13.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/subplot/subplot_13.cpp"
```

Tiled Layout

tiledlayout(rows, cols);
nexttile();
See result

example_tiledlayout_1

More Examples:

example_tiledlayout_2 example_tiledlayout_3 example_tiledlayout_4 example_tiledlayout_5 example_tiledlayout_6 example_tiledlayout_7 example_tiledlayout_8

===! "Plot"

[![example_tiledlayout_1](docs/examples/appearance/multiplot/tiledlayout/tiledlayout_1.svg)](examples/appearance/multiplot/tiledlayout/tiledlayout_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/tiledlayout/tiledlayout_1.cpp"
```

More Examples:

===! "Plot"

[![example_tiledlayout_2](docs/examples/appearance/multiplot/tiledlayout/tiledlayout_2.png)](examples/appearance/multiplot/tiledlayout/tiledlayout_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/tiledlayout/tiledlayout_2.cpp"
```

===! "Plot"

[![example_tiledlayout_3](docs/examples/appearance/multiplot/tiledlayout/tiledlayout_3.svg)](examples/appearance/multiplot/tiledlayout/tiledlayout_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/tiledlayout/tiledlayout_3.cpp"
```

===! "Plot"

[![example_tiledlayout_4](docs/examples/appearance/multiplot/tiledlayout/tiledlayout_4.svg)](examples/appearance/multiplot/tiledlayout/tiledlayout_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/tiledlayout/tiledlayout_4.cpp"
```

===! "Plot"

[![example_tiledlayout_5](docs/examples/appearance/multiplot/tiledlayout/tiledlayout_5.svg)](examples/appearance/multiplot/tiledlayout/tiledlayout_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/tiledlayout/tiledlayout_5.cpp"
```

===! "Plot"

[![example_tiledlayout_6](docs/examples/appearance/multiplot/tiledlayout/tiledlayout_6.svg)](examples/appearance/multiplot/tiledlayout/tiledlayout_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/tiledlayout/tiledlayout_6.cpp"
```

===! "Plot"

[![example_tiledlayout_7](docs/examples/appearance/multiplot/tiledlayout/tiledlayout_7.png)](examples/appearance/multiplot/tiledlayout/tiledlayout_7.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/tiledlayout/tiledlayout_7.cpp"
```

===! "Plot"

[![example_tiledlayout_8](docs/examples/appearance/multiplot/tiledlayout/tiledlayout_8.png)](examples/appearance/multiplot/tiledlayout/tiledlayout_8.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/multiplot/tiledlayout/tiledlayout_8.cpp"
```

Our tiling functions are convenience shortcuts for the subplot functions. If there is no room for the next tile, we automatically rearrange the axes and increase the number of subplot rows or columns to fit the next tile. Use subplots for more control over the subplots.

Colormaps

Colormap

As a convenience, the colors.h header contains many functions to generate colors from strings and vice-versa.

colormap(colors);
See result

example_colormap_1

More Examples:

example_colormap_2 example_colormap_3 example_colormap_4 example_colormap_5 example_colormap_6 example_colormap_7 example_colormap_8 example_colormap_9

===! "Plot"

[![example_colormap_1](docs/examples/appearance/colormaps/colormap/colormap_1.png)](examples/appearance/colormaps/colormap/colormap_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colormap/colormap_1.cpp"
```

More Examples:

===! "Plot"

[![example_colormap_2](docs/examples/appearance/colormaps/colormap/colormap_2.png)](examples/appearance/colormaps/colormap/colormap_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colormap/colormap_2.cpp"
```

===! "Plot"

[![example_colormap_3](docs/examples/appearance/colormaps/colormap/colormap_3.png)](examples/appearance/colormaps/colormap/colormap_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colormap/colormap_3.cpp"
```

===! "Plot"

[![example_colormap_4](docs/examples/appearance/colormaps/colormap/colormap_4.png)](examples/appearance/colormaps/colormap/colormap_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colormap/colormap_4.cpp"
```

===! "Plot"

[![example_colormap_5](docs/examples/appearance/colormaps/colormap/colormap_5.png)](examples/appearance/colormaps/colormap/colormap_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colormap/colormap_5.cpp"
```

===! "Plot"

[![example_colormap_6](docs/examples/appearance/colormaps/colormap/colormap_6.png)](examples/appearance/colormaps/colormap/colormap_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colormap/colormap_6.cpp"
```

===! "Plot"

[![example_colormap_7](docs/examples/appearance/colormaps/colormap/colormap_7.png)](examples/appearance/colormaps/colormap/colormap_7.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colormap/colormap_7.cpp"
```

===! "Plot"

[![example_colormap_8](docs/examples/appearance/colormaps/colormap/colormap_8.png)](examples/appearance/colormaps/colormap/colormap_8.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colormap/colormap_8.cpp"
```

===! "Plot"

[![example_colormap_9](docs/examples/appearance/colormaps/colormap/colormap_9.svg)](examples/appearance/colormaps/colormap/colormap_9.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colormap/colormap_9.cpp"
```

Color Bar

colorbar();
See result

example_colorbar_1

More Examples:

example_colorbar_2 example_colorbar_3 example_colorbar_4 example_colorbar_5 example_colorbar_6 example_colorbar_7

===! "Plot"

[![example_colorbar_1](docs/examples/appearance/colormaps/colorbar/colorbar_1.png)](examples/appearance/colormaps/colorbar/colorbar_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colorbar/colorbar_1.cpp"
```

More Examples:

===! "Plot"

[![example_colorbar_2](docs/examples/appearance/colormaps/colorbar/colorbar_2.png)](examples/appearance/colormaps/colorbar/colorbar_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colorbar/colorbar_2.cpp"
```

===! "Plot"

[![example_colorbar_3](docs/examples/appearance/colormaps/colorbar/colorbar_3.png)](examples/appearance/colormaps/colorbar/colorbar_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colorbar/colorbar_3.cpp"
```

===! "Plot"

[![example_colorbar_4](docs/examples/appearance/colormaps/colorbar/colorbar_4.png)](examples/appearance/colormaps/colorbar/colorbar_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colorbar/colorbar_4.cpp"
```

===! "Plot"

[![example_colorbar_5](docs/examples/appearance/colormaps/colorbar/colorbar_5.svg)](examples/appearance/colormaps/colorbar/colorbar_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colorbar/colorbar_5.cpp"
```

===! "Plot"

[![example_colorbar_6](docs/examples/appearance/colormaps/colorbar/colorbar_6.png)](examples/appearance/colormaps/colorbar/colorbar_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colorbar/colorbar_6.cpp"
```

===! "Plot"

[![example_colorbar_7](docs/examples/appearance/colormaps/colorbar/colorbar_7.png)](examples/appearance/colormaps/colorbar/colorbar_7.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/colorbar/colorbar_7.cpp"
```

RGB Plot

rgbplot(colors);
See result

example_rgbplot_1

More Examples:

example_rgbplot_2

===! "Plot"

[![example_rgbplot_1](docs/examples/appearance/colormaps/rgbplot/rgbplot_1.svg)](examples/appearance/colormaps/rgbplot/rgbplot_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/rgbplot/rgbplot_1.cpp"
```

More Examples:

===! "Plot"

[![example_rgbplot_2](docs/examples/appearance/colormaps/rgbplot/rgbplot_2.svg)](examples/appearance/colormaps/rgbplot/rgbplot_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/colormaps/rgbplot/rgbplot_2.cpp"
```

Camera

View

view(az, el);
See result

example_view_1

More Examples:

example_view_2 example_view_3 example_view_4 example_view_5

===! "Plot"

[![example_view_1](docs/examples/appearance/camera/view/view_1.png)](examples/appearance/camera/view/view_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/camera/view/view_1.cpp"
```

More Examples:

===! "Plot"

[![example_view_2](docs/examples/appearance/camera/view/view_2.png)](examples/appearance/camera/view/view_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/camera/view/view_2.cpp"
```

===! "Plot"

[![example_view_3](docs/examples/appearance/camera/view/view_3.svg)](examples/appearance/camera/view/view_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/camera/view/view_3.cpp"
```

===! "Plot"

[![example_view_4](docs/examples/appearance/camera/view/view_4.svg)](examples/appearance/camera/view/view_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/camera/view/view_4.cpp"
```

===! "Plot"

[![example_view_5](docs/examples/appearance/camera/view/view_5.svg)](examples/appearance/camera/view/view_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/camera/view/view_5.cpp"
```

===! "Plot"

[![example_view_6](docs/examples/appearance/camera/view/view_6.png)](examples/appearance/camera/view/view_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/camera/view/view_6.cpp"
```

Lighting

surf(x, y, z)->lighting(true);
See result

example_lighting_1

More Examples:

example_lighting_2 example_lighting_3 example_lighting_4 example_lighting_5 example_lighting_6

===! "Plot"

[![example_lighting_1](docs/examples/appearance/camera/lighting/lighting_1.png)](examples/appearance/camera/lighting/lighting_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/camera/lighting/lighting_1.cpp"
```

More Examples:

===! "Plot"

[![example_lighting_2](docs/examples/appearance/camera/lighting/lighting_2.png)](examples/appearance/camera/lighting/lighting_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/camera/lighting/lighting_2.cpp"
```

===! "Plot"

[![example_lighting_3](docs/examples/appearance/camera/lighting/lighting_3.png)](examples/appearance/camera/lighting/lighting_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/camera/lighting/lighting_3.cpp"
```

===! "Plot"

[![example_lighting_4](docs/examples/appearance/camera/lighting/lighting_4.png)](examples/appearance/camera/lighting/lighting_4.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/camera/lighting/lighting_4.cpp"
```

===! "Plot"

[![example_lighting_5](docs/examples/appearance/camera/lighting/lighting_5.png)](examples/appearance/camera/lighting/lighting_5.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/camera/lighting/lighting_5.cpp"
```

===! "Plot"

[![example_lighting_6](docs/examples/appearance/camera/lighting/lighting_6.png)](examples/appearance/camera/lighting/lighting_6.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/camera/lighting/lighting_6.cpp"
```

Figure Object

figure();
See result

example_figure_1

More Examples:

example_figure_2 example_figure_3

===! "Plot"

[![example_figure_1](docs/examples/appearance/figure/figure_1.svg)](examples/appearance/figure/figure_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/figure/figure_1.cpp"
```

More Examples:

===! "Plot"

[![example_figure_2](docs/examples/appearance/figure/figure_2.svg)](examples/appearance/figure/figure_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/figure/figure_2.cpp"
```

===! "Plot"

[![example_figure_3](docs/examples/appearance/figure/figure_3.svg)](examples/appearance/figure/figure_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/figure/figure_3.cpp"
```

Line Specs

fplot(fn, spec_str);
See result

example_line_spec_1

===! "Plot"

[![example_line_spec_1](docs/examples/appearance/line_spec/line_spec_1.svg)](examples/appearance/line_spec/line_spec_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/line_spec/line_spec_1.cpp"
```

Axes Object

auto ax1 = gca();
See result

example_axes_1

More Examples:

example_axes_2 example_axes_3

===! "Plot"

[![example_axes_1](docs/examples/appearance/axes/axes_1.svg)](examples/appearance/axes/axes_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axes/axes_1.cpp"
```

More Examples:

===! "Plot"

[![example_axes_2](docs/examples/appearance/axes/axes_2.png)](examples/appearance/axes/axes_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axes/axes_2.cpp"
```

===! "Plot"

[![example_axes_3](docs/examples/appearance/axes/axes_3.svg)](examples/appearance/axes/axes_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/axes/axes_3.cpp"
```

Clear Axes

cla();
See result

example_cla_1

More Examples:

example_cla_2 example_cla_3

===! "Plot"

[![example_cla_1](docs/examples/appearance/cla/cla_1.svg)](examples/appearance/cla/cla_1.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/cla/cla_1.cpp"
```

More Examples:

===! "Plot"

[![example_cla_2](docs/examples/appearance/cla/cla_2.svg)](examples/appearance/cla/cla_2.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/cla/cla_2.cpp"
```

===! "Plot"

[![example_cla_3](docs/examples/appearance/cla/cla_3.svg)](examples/appearance/cla/cla_3.cpp)

=== "C++"

```cpp
--8<-- "examples/appearance/cla/cla_3.cpp"
```

Exporting

Saving (Manually)

The interactive plot window contains a widget to save the current figure. Because this widget uses the same backend as the one used to produce the interactive image, the final image matches closely what the user sees in the window.

Saving (Programatically)

You can programmatically save the figure in a number of formats with the save function:

save(filename);

or

save(filename, fileformat);
See result

example_save_1

More Examples:

example_save_2 example_save_3 example_save_4 example_save_5 example_save_6 example_save_7 example_save_8

===! "Plot"

[![example_save_1](docs/examples/exporting/save/save_1.png)](examples/exporting/save/save_1.cpp)

=== "C++"

```cpp
--8<-- "examples/exporting/save/save_1.cpp"
```

More Examples:

===! "Plot"

[![example_save_2](docs/examples/exporting/save/save_2.png)](examples/exporting/save/save_2.cpp)

=== "C++"

```cpp
--8<-- "examples/exporting/save/save_2.cpp"
```

===! "Plot"

[![example_save_3](docs/examples/exporting/save/save_3.png)](examples/exporting/save/save_3.cpp)

=== "C++"

```cpp
--8<-- "examples/exporting/save/save_3.cpp"
```

===! "Plot"

[![example_save_4](docs/examples/exporting/save/save_4.svg)](examples/exporting/save/save_4.cpp)

=== "C++"

```cpp
--8<-- "examples/exporting/save/save_4.cpp"
```

===! "Plot"

[![example_save_5](docs/examples/exporting/save/save_5.svg)](examples/exporting/save/save_5.cpp)

=== "C++"

```cpp
--8<-- "examples/exporting/save/save_5.cpp"
```

===! "Plot"

[![example_save_6](docs/examples/exporting/save/save_6.svg)](examples/exporting/save/save_6.cpp)

=== "C++"

```cpp
--8<-- "examples/exporting/save/save_6.cpp"
```

===! "Plot"

[![example_save_7](docs/examples/exporting/save/save_7.svg)](examples/exporting/save/save_7.cpp)

=== "C++"

```cpp
--8<-- "examples/exporting/save/save_7.cpp"
```

===! "Plot"

[![example_save_8](docs/examples/exporting/save/save_8.png)](examples/exporting/save/save_8.cpp)

=== "C++"

```cpp
--8<-- "examples/exporting/save/save_8.cpp"
```

The first option (save(filename)) infers the appropriate file format from the filename extension. In both cases (save(filename) and save(filename,fileformat)), this function temporarily changes the backend to a non-interactive backend appropriate to draw the figure. A different backend is used for each format and, depending on the format, the final image does not necessarily match what is on the interactive plot window. The reason is that some file formats purposefully do not include the same features.

For instance, consider the bar chart generated by

vector<double> x = {29, 17, 14, 13, 12, 4, 11};
bar(x);

If we export the image with

save("barchart.svg");

we get the vector graphics

See result

Barchart as SVG file

Exporting the image with

save("barchart.txt");

generates a representation of the image appropriate for text or markdown files, such as

See result

       30 +-----------------------------------------------------------+
          |    *******   +       +      +       +      +       +      |
          |    *     *                                                |
       25 |-+  *     *                                              +-|
          |    *     *                                                |
          |    *     *                                                |
       20 |-+  *     *                                              +-|
          |    *     *                                                |
          |    *     ********                                         |
       15 |-+  *     **     *                                       +-|
          |    *     **     * *******                                 |
          |    *     **     * *     ******** *******                  |
          |    *     **     * *     **     * *     *        *******   |
       10 |-+  *     **     * *     **     * *     *        *     * +-|
          |    *     **     * *     **     * *     *        *     *   |
          |    *     **     * *     **     * *     *        *     *   |
        5 |-+  *     **     * *     **     * *     ******** *     * +-|
          |    *     **     * *     **     * *     **     * *     *   |
          |    *  +  **  +  * *  +  **  +  * *  +  **  +  * *  +  *   |
        0 +-----------------------------------------------------------+
                  1      2       3      4       5      6       7

As the last example, saving an image with

save("barchart.tex");

would save the image in a format appropriate to embed in latex documents, such as

See result

Barchart - Latex

This exports the image in a format in which the labels are replaced by latex text so that the plot fits the rest of the document.

Coding styles

Member vs. Free-standing Functions

Like in Matplotlib, we support two coding styles: Free-standing functions and an Object-oriented interface.

These two examples would generate the same plot:

=== "Free-standing functions"

```cpp
auto ax = gca();
plot(ax, x, y)->color("red").line_width(2);
my_function(ax);
```

=== "Object-oriented interface"

```cpp
auto ax = gca();
ax->plot(x, y)->color("red").line_width(2);
my_function(ax);
```
  • Freestanding functions:

    • We call functions to create plots on the current axes
    • The global current axes object is the current axes object in the current figure in the global figure registry
    • For instance, one can use plot(y); to create a line plot on the current axes (or create a new axes object if needed).
    • Also, one can use plot(ax,y); to create a line plot on the axes object ax.
    • This is less verbose for small projects and quick tests.
    • The library looks for existing axes to create the plot.
  • Object-oriented interface:

    • We explicitly create figures and call methods on them
    • For instance, one can use ax->plot(y); to plot on the axes object ax
    • We can create the same line plot on the current axes by auto ax = gca(); ax->plot(y);
    • This is less verbose and provides better control in large projects where we need to pass these objects around
    • The user manages axes handles containing plots.

All free-standing functions are templated functions that use meta-programming to call the main function on the current axes object. If the first parameter is not an axes_handle, it will get an axes_handle from the figure registry with gca (Section Axes Object) and forward all parameters to the function in this axes object. If the first parameter is an axes_handle, the template function will forward all parameters, but the first one, to this axes object. This use of templates for the free-standing functions keeps both coding styles maintainable by the developers.

Note that, because the example needs the axes object for the function my_function, we also need to get a reference to the axes object with the free-standing functions. In that case, the free-standing functions are not less verbose than the object-oriented interface.

To adhere to free-standing functions, we could create two versions of my_function: one that receives an axes_handle, and a second version that would get an axes_handle from the figure registry and call the first version. If my_function is going to be exposed to other users as a library, this could be a convenience to these users. However, notice that this is only moving the verbosity from the main function to my_function. In fact, this is how the free-standing functions in Matplot++ work.

Reactive vs. Quiet Figures

There are also two modes for figures: reactive (or interactive) mode and quiet mode.

=== "Reactive mode"

```cpp
// Reactive mode
auto f = figure(false);
auto ax = f->gca();
auto p = ax->plot(ax, x, y);   // draws once
p->color("red").line_width(2); // draws twice more
show();                        // pause console
```

=== "Quiet mode"

```cpp
// Quiet mode
auto f = figure(true);
auto ax = f->gca();
auto p = ax->plot(x,y);        // does not draw
p->color("red").line_width(2); // does not draw
f->show();                     // draw only once and pause console
```

Figures in reactive mode are updated whenever any of their child objects change. This happens through the touch function, that gets called on any child object when it changes its appearance. This creates an interactive mode in which figures are updated as soon as we adjust their properties. If we combine interactive figures with free-standing functions, we have a "Matlab-like style" for plots. This is a coding pattern where the figure registry works as a stream for plots. The problem with this coding style is that the user might unnecessarily create useless intermediary plots.

Figures in quiet mode are updated by calling the functions draw() or show() (Section Reactive Figures). Unless these functions are called, nothing changes in the figure. The combination of the object-oriented coding style and quiet mode is the "OO-Matplotlib-like style" for plots. This is a coding style in which the user explicitly decides when the plot is shown or updated. This is beneficial to applications that cannot waste computational resources on intermediary figures that might not be valuable to the application.

We generally use free-standing functions with reactive mode and the object-oriented interface with quiet mode. By default, new figures are in reactive mode, unless it is using an non-interactive backend. One can turn this reactive mode on and off with:

  • ion() or ioff() free-standing functions
  • reactive(bool) or quiet(bool) function on the figure object
  • figure(true) or figure(false) when explicitly creating a new figure

For convenience, the examples in Section Examples use the reactive mode. The show function pauses the console until the user interacts with the plot window. If the backend is based on process pipes, because these are unidirectional, closing the window is not enough to resume. The user needs to use the console to unblock execution. A similar example is quiet mode would be

In this example, the figure is only updated once. The user could replace the show function with the draw function, but the window would close as soon as execution completes. It is important to use show() with caution. These functions are meant for some particular executables so that an interactive plot does not close before the user can see it. It is probably unreasonable to call these functions inside a library because the user would have to manually interfere with the execution to continue.

Method Chaining

To support a more compact syntax, the library allows method chaining on plot objects. For instance, we can create a simple line plot and modify its appearance by

=== "Object Handle"

```cpp
// Using the line handle
auto p = plot(x,y,"--gs");
p->line_width(2);
p->marker_size(10);
p->marker_color("b");
p->marker_face_color({.5,.5,.5});
```

=== "Method Chaining"

```cpp
// Method chaining
plot(x,y,"--gs")
  ->line_width(2)
  .marker_size(10)
  .marker_color("b")
  .marker_face_color({.5,.5,.5});
```

The first code snippet works because plot returns a line_handle to the object in the axes. We can use this line handle to modify the line plot. Whenever we modify a property, the setter function calls touch, which will draw the figure again if it is in reactive mode. The second option works because setters return a reference to *this rather than void.

Ranges

The plotting functions work on any range of elements convertible to double. For instance, we can create a line plot from a set of elements by

set<int> y = {6,3,8,2,5};
plot(y);

Any object that has the functions begin and end are considered iterable ranges. Most axes object subclasses use vector<double> or vector<vector<double>> to store their data. For convenience, the common.h header file includes the aliases vector_1d and vector_2d to these data types.

These conversions also work on ranges of ranges:

vector<set<int>> Y = { {6, 3, 8, 2, 5}, {6, 3, 5, 8, 2} };
plot(Y);

Unfortunately, because of how templated functions work, one exception is initializer lists. Initializer lists only work for functions that are explicitly defined for them.

Common Utilities

The headers common.h and colors.h include a number of utilities we use in our examples. These include naive functions to:

  • generate and manipulate vectors and strings;
  • handle RGBA color arrays;
  • convert points to and from polar coordinates;
  • read files to strings;
  • write strings to files;
  • calculate gradients;
  • read, write, and manipulate images;
  • and generate vectors with random numbers.

Although some of these functions might be helpful, most functions only operate on std::vector<double> and they are not intended to be a library of utilities. The sole purpose of these algorithms is to simplify the examples.

Backends

This library currently include a GnuPlot backend and an experimental OpenGL backend. Coming up with new backends is a continuous process. See the complete article for a description of the backend interface, a description of the current default backend (Gnuplot pipe), and what's involved in possible new backends. See the directory source/matplot/backend for some examples. Also, have a look at this example test/backends/main.cpp.

If you're in a hurry, here is a summary of the backends we have and the backends we have been considering or are working on:

  • Gnuplot
    • Pros: It seems to be working for everyone.
    • Cons: Pipes are comparatively slow and unidirectional
    • In practice, this is default backend you'll get right now.
  • OpenGL
    • Pros: Efficient for many FPS.
    • Cons: Blocks the main thread on some operating systems
    • The experimental OpenGL backend already works for some plot categories. see 1
  • Qt
    • Same as OpenGL see 1, 2
  • AGG
    • Pros: Great for vector graphics
    • Cons: Unmaintained, 2D only, and non-interactive by itself see 1, 2, 3

Motivation and Details

If you are interested in understanding how the library works, you can read the details in the complete article. It describes the relationship between its main objects, the backend interface, how to create new plot categories, its limitations, and compares this library with similar alternatives.

Community

Get Involved

  • After getting started with this library, please complete this survey to let us know how we can improve your experience.
  • Discussions are concentrated on our GitHub discussions page. Don't refrain from asking questions and proposing ideas. If this library helps you create something interesting, please divulge it with the community.
  • If you are a programmer with good ideas, please share these ideas with us.
  • Academic collaboration is more than welcome. It'd be great to see this library help people write lots and lots of academic papers.

Ideas and Roadmap

Feel free to contribute with new features to this library. For complex features and changes, consider getting feedback from the community first. Contributing to an existing code base with its own conventions might seem intricate at first but please don't let that discourage you from sharing your ideas.

There are many ways in which you can contribute to this library:

  • Testing the library in new environments see 1, 2, 3
  • Contributing with interesting examples see 1
  • Designing new backends see 1, 2, 3, 4
  • Finding problems in this documentation see 1
  • Writing algorithms for new plot categories see 1
  • Finding bugs in general see 1, 2, 3, 4
  • Whatever idea seems interesting to you

The only thing we ask you is to make sure your contribution is not destructive. Some contributions in which we are not interested are:

  • "I don't like this optional feature so I removed/deprecated it"
  • "I removed this feature to support older versions of C++" but have not provided an equivalent alternative
  • "I removed this feature so I don't have to install/update ______" but have not provided an equivalent alternative
  • "I'm creating this high-cost promise that we'll support ________ forever" but I'm not sticking around to keep that promise

In doubt, please open a discussion first

Contributing Guidelines

If contributing with code, please leave the OpenGL backend and pedantic mode ON (-DMATPLOTPP_BUILD_EXPERIMENTAL_OPENGL_BACKEND=ON -DMATPLOTPP_BUILD_WITH_PEDANTIC_WARNINGS=ON), use cppcheck, and clang-format.

Example: CLion

CLion Settings with Pedantic Mode

If contributing to the documentation, please edit README.md directly, as the files in ./docs are automatically generated with mdsplit.

Contributors

alandefreitas
Alan De Freitas
mrexodia
Duncan Ogilvie
lacc97
Luis CC!ceres
matthew-hennefarth
Matthew-hennefarth
actions-user
Actions-user
aminya
Amin Yahyaabadi
j0hnnybash
J0hnnybash
leha-bot
Alex
rath3t
Rath3t
xnorpx
Marcus Asteborg
edvinsmineikis
Edvins Mineikis
codeinred
Alecto Irene Perez
gitplcc
Gitplcc
madronalabs
Randy Jones
sammi
Sammi
acxz
Akash Patel
aalbaali
Amro Al-Baali
avocadoboi
BjC6rn Sundin
csernib
BC!lint Cserni
david-x64
David
dimztimz
Dimitrij Mijoski
saxbophone
Joshua Saxby
MaBnt
MaBnt
globberwops
Martin Stump
Morwenn
Morwenn
kaffehalv
Niclas Wall Wennerdal
RTrioux
RTrioux
solosuper
Solo Super
TheGreatRambler
TheGreatRambler
ankane
Andrew Kane
wwinslade
William Winslade

We would also like to thank The Icculus Microgrant.

References

These are some references we used for this work:

  • Abadi M, Barham P, Chen J, Chen Z, Davis A, Dean J, Devin M, Ghemawat S, Irving G,Isard M,et al.(2016). "Tensorflow: A system for large-scale machine learning." In 12th USENIX symposium on operating systems design and implementation (OSDI 16), pp.265-283.

  • Angerson E, Bai Z, Dongarra J, Greenbaum A, McKenney A, Du Croz J, Hammarling S,Demmel J, Bischof C, Sorensen D (1990). "LAPACK: A portable linear algebra library for high-performance computers." In Supercomputing'90: Proceedings of the 1990 ACM/IEEE Conference on Supercomputing, pp. 2-11. IEEE.

  • Antcheva I, Ballintijn M, Bellenot B, Biskup M, Brun R, Buncic N, Canal P, Casadei D, CouetO, Fine V, et al.(2011). "ROOT-A C++ framework for petabyte data storage, statistical analysis and visualization."Computer Physics Communications,182(6), 1384-1385.

  • Baratov R (2019). Hunter. URL: https://hunter.readthedocs.io.

  • Barrett P, Hunter J, Miller JT, Hsu JC, Greenfield P (2005). "matplotlib-A Portable Python Plotting Package." In Astronomical data analysis software and systems XIV, volume 347,p. 91.

  • Bezanson J, Edelman A, Karpinski S, Shah VB (2017). "Julia: A fresh approach to numerical computing. "SIAM review,59(1), 65-98.

  • CEGUI Team (2020). CEGUI. URL: http://cegui.org.uk.

  • Cornut O (2020). Dear ImGui: Bloat-free Immediate Mode Graphical User Interface for C++ with minimal dependencies. URL: https://github.com/ocornut/imgui.

  • de Guzman J (2020). Elements. URL: http://cycfi.github.io/elements/.

  • Eichhammer E (2020). QCustomPlot. URL: https://www.qcustomplot.com.

  • Evers B (2019). Matplotlib-cpp. URL: https://github.com/lava/matplotlib-cpp.

  • Freitas A (2020). Pareto Front Library. URL: https://github.com/alandefreitas/pareto-front.

  • Frigo M, Johnson SG (1998). "FFTW: An adaptive software architecture for the FFT." In Proceedings of the 1998 IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP'98 (Cat. No. 98CH36181), volume 3, pp. 1381-1384. IEEE.

  • Fruchterman TM, Reingold EM (1991). "Graph drawing by force-directed placement. "Software: Practice and experience, 21(11), 1129-1164.

  • GNU Project (2020). GNU Octave: Introduction to Plotting. URL: https://octave.org/doc/v4.2.2/Introduction-to-Plotting.html.

  • Guy Eric Schalnat Andreas Dilger GRP (2020). Libpng. URL: https://sourceforge.net/p/libpng/.

  • Hao J (2020). Nana. URL: http://nanapro.org/.

  • Hunter JD (2007). "Matplotlib: A 2D graphics environment. "Computing in Science & Engineering, 9(3), 90-95. doi:10.1109/MCSE.2007.55.

  • Idea4good (2020). GuiLite. URL: https://github.com/idea4good/GuiLite.

  • ImageMagick Studio LLC (2020). Magick++. URL: https://imagemagick.org/Magick++/.

  • Independent JPEG Group (2020). Libjpeg. URL: http://libjpeg.sourceforge.net.

  • Intel Corporation, Willow Garage I (2020). Open Source Computer Vision Library (OpenCV). URL: https://opencv.org/.

  • Jakob W (2017). PyBind11. URL: https://pybind11.readthedocs.io/en/stable/.

  • Kagstrom B LP, C VL (2020). Basic Linear Algebra Subprograms (BLAS). URL: http://www.netlib.org/blas/.

  • Kainz F, Bogart R, Hess D (2003). "The OpenEXR image file format."SIGGRAPH TechnicalSketches.

  • Kamada T, Kawai S,et al.(1989). "An algorithm for drawing general undirected graphs."Information processing letters,31(1), 7-15.

  • Loup Gailly J, Adler M (2020). Zlib. URL: https://github.com/madler/zlib.

  • Martin K, Hoffman B (2010). Mastering CMake: a cross-platform build system. Kitware.

  • McKinney W,et al.(2011). "Pandas: a foundational Python library for data analysis and statistics. "Python for High Performance and Scientific Computing, 14(9).

  • Conan.io (2020). Conan. URL: https://conan.io.

  • Melchior L (2020). CPM.cmake. URL: https://github.com/TheLartians/CPM.cmake.

  • Murray Cumming DE (2020). Gtkmm. URL: https://www.gtkmm.org/.

  • Natural Earth (2018). "Natural earth. Free vector and raster map data." URL: http://www.naturalearthdata.com/downloads/.

  • NetworkX developers (2020). NetworkX. URL: https://networkx.github.io.

  • Olivier Birot (2020). nodesoup. URL: https://github.com/olvb/nodesoup.

  • Pezent E (2020). ImPlot. URL: https://github.com/epezent/implot.

  • Sam Leffler SG (2020). Libtiff. URL: https://gitlab.com/libtiff/libtiff.

  • Schaling B (2011). The boost C++ libraries. Boris Schaling.

  • Spitzak B, et al.(2004). "Fast Light Toolkit (FLTK)." FTLK: Fast light toolkit. Available: http://www.fltk.org/

  • Stahlke D (2020). Gnuplot-Iostream. URL: http://stahlke.org/dan/gnuplot-iostream/.

  • Storer J (2020). JUCE. URL: https://juce.com.

  • Terra Informatica Software, Inc (2020). Sciter. URL: https://sciter.com.

  • The FLTK Team (2020). FLTK. URL: https://www.fltk.org.

  • The MathWorks, Inc (2020). MatlabGraphics. URL: https://www.mathworks.com/help/matlab/graphics.html.

  • The Qt Company (2020). Qt. URL: https://www.qt.io.

  • Tschumperle D (2020). CImg. URL: http://cimg.eu.

  • van der Zijp J (2020). Fox toolkit. URL: http://fox-toolkit.org.

  • Vasilev V, Canal P, Naumann A, Russo P (2012). "Cling-the new interactive interpreter for root 6." In Journal of Physics: Conference Series, volume 396, p. 052071.

  • Walt Svd, Colbert SC, Varoquaux G (2011). "The NumPy array: a structure for efficient numerical computation." Computing in science & engineering,13(2), 22-30.

  • Wei V (2020). MiniGUI. URL: http://www.minigui.com.

  • Williams T, Kelley C, Bersch C, Broker HB, Campbell J, Cunningham R, Denholm D, Elber G, Fearick R, Grammes C,et al.(2017). "gnuplot 5.2."

  • wxWidgets (2020). WxWidgets. URL: https://wxwidgets.org.

  • XOrg Foundation (2020). X11. URL: https://www.x.org/.

  • Zaitsev S (2020). Webview. URL: https://github.com/zserge/webview.

  • Zakai A (2011). "Emscripten: an LLVM-to-JavaScript compiler." In Proceedings of the ACM international conference companion on Object oriented programming systems languages and applications companion, pp. 301-312.

matplotplusplus's People

Contributors

actions-user avatar acxz avatar alandefreitas avatar aminya avatar codeinred avatar diverger avatar eagle-dai avatar edvinsmineikis avatar geral-victor avatar github-actions[bot] avatar gitplcc avatar ino-josh avatar j0hnnybash avatar kaffehalv avatar kwoodle avatar lacc97 avatar leha-bot avatar madronalabs avatar matthew-hennefarth avatar mrexodia avatar myd7349 avatar rath3t avatar rtrioux avatar sammi avatar solosuper avatar thegreatrambler avatar tretre91 avatar wjdragon avatar wwinslade avatar xnorpx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

matplotplusplus's Issues

axes_objects/contourc.cpp:584: out-of-bounds while accessing the _Z_rows[n_col][n_row] in contours::is_lower_level()

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug
At some grids (e.g. transposed) the matplot::contourf() fails with runtime error.

Steps to Reproduce

  1. This error could be triggered by simply swapping X and Y in examples/contour_plots/contourf/contourf_1.cpp
# Your steps go here
mkdir build
cd build
cmake ..  -DCMAKE_BUILD_TYPE=Debug

Output

# The output you got
/usr/include/c++/9/bits/stl_vector.h:1042: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::vector<double>; _Alloc = std::allocator<std::vector<double> >; std::vector<_Tp, _Alloc>::reference = std::vector<double>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.

Platform

  • cross-platform issue - linux
  • cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: CentOS
  • OS Version: 8
  • Compiler: GCC
  • Compiler version: 9.3.1

Additional context

While debugging I found that sometimes the std::find_if() here returns end iterator and at next lines the variables n_row, n_column are could not be adjusted and this is follows to out-of-bounds error in header.
The dirty hack is the simply decrement n_row, n_col after checking all directions and before determining the opposite points here, but I doubt in robustness of this fix. @alandefreitas what do you think?

Decrease minimum required CMake version

Feature category

  • enhancement - build system
  • enhancement - backends
  • enhancement - documentation
  • enhancement - plot categories

The problem

While building for Ubuntu 18 works, users need to manually install their cmake versions to get things to build. As well as the default gcc version does not support fully c++17, in particular std::filesystem does not exist but instead there is std::experimental::filesystem.

Essentially my issue is that I would like to use matplotplusplus with the default versions of the dependencies available on Ubuntu 18.

The solution I'd like
Decrease the minimum cmake required version to 3.10 and allow the building with a slightly older gcc (gcc 7.5).

Alternatives I've considered
To get things working on older distributions where the gcc version is not 8 and the cmake version is not 3.14 there is not much that can be done, besides upgrading your distribution like going from Ubuntu 18 to Ubuntu 20 or manually installing new versions of these deps as already recommended.

Additional context

Related: #59

A library should not use its dependecies from source

Instead, it should strictly use find_package or maybe find_library. There shouldn't be CPM.cmake, no Hunter, no FetchContent + add_subdirectory. Those things are useful only for executables. If you are bundling the dependencies, you can easily get ODR violations. Additionally you make the library harder for packaging in other package managers like apt or vcpkg. For example

My Prog ---- depends -----> matplot++ ----- depends ------> bundled/downloaded glfw
          \
           -----------------------------------------------> system glfw

And now you have a ODR violation because you have 2 glfw in the program. See this CppCon talk for more info https://www.youtube.com/watch?v=sBP17HQAQjk

As a middle ground, you should always use find_package for popular libraries and use CPM for stuff that isn't available in other package managers.

cmake fails when looking for filesystem

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning

Describe the bug
CMake failes on building as it cannot find std::filesystem.

Steps to Reproduce

mkdir build
cd build
cmake .. <options> -DCMAKE_BUILD_TYPE=Release

Output

CMAKE_MODULE_PATH=/home/martin/test/plotting/matplotplusplus/cmake
-- A library with LAPACK API found.
CMake Error at matplotplusplus/cmake/FindFilesystem.cmake:246 (message):
  Cannot run simple program using std::filesystem
Call Stack (most recent call first):
  matplotplusplus/source/matplot/CMakeLists.txt:1 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/martin/test/plotting/CMakeFiles/CMakeOutput.log".
See also "/home/martin/test/plotting/CMakeFiles/CMakeError.log".

Platform

  • cross-platform issue - linux
  • cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: Ubuntu
  • OS Version: 18.04.5
  • Compiler: GCC
  • Compiler version: 7.5.0

Additional context

Ubunto error with gcc 8++: error: ISO C++17 does not allow dynamic exception specifications

Is get error:

[  2%] Building CXX object source/matplot/CMakeFiles/matplot.dir/util/common.cpp.o
In file included from /usr/include/OpenEXR/ImfHeader.h:51,
                 from /usr/include/OpenEXR/ImfRgbaFile.h:50,
                 from matplotplusplus/source/3rd_party/cimg/CImg.h:549,
                 from matplotplusplus/source/matplot/util/common.cpp:16:
/usr/include/OpenEXR/ImathVec.h:228:34: error: ISO C++17 does not allow dynamic exception specifications
     const Vec2 & normalizeExc () throw (IEX_NAMESPACE::MathExc);

Same as here: stack-of-tasks/pinocchio#786

shell created by popen cannot find gnuplot

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug
Running my first example failed because the PATH variable of the shell made by popen did not allow it to find gnuplot.

Steps to Reproduce

  • install matplotplusplus from the package provided by Homebrew
  • copy the example program plot_1.cpp into a new project
  • compile the project, linking to libmatplot.a

Output

sh: command not found: gnuplot

Platform

  • cross-platform issue - linux
  • cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: 10.15.6 (Catalina)
  • OS Version:
  • Compiler: Apple Clang
  • Compiler version: 11.0.3

Additional context

I don't know whether this is something that broke with Catalina. I tried making sh launch bash as well as zsh and they both have this issue. In particular, zsh is required to load /etc/zshenv on startup whether the shell is interactive or not, however it is clearly not doing this when launched by popen, with the sad result that it can't find commands in /usr/local/bin.

While the Mac OS behavior leading to this issue is clearly broken, there should be a way to address this without having to build matplotplusplus from source. I did go down that path, and ran into other problems.

The command "gnuplot" is hard-coded into the popen command in gnuplot.cpp. Adding an option in the matplot++ API to set this to a different command (in my case "usr/local/bin/gnuplot") or add a path would be one workaround for the problem I am facing here.

segfault/assertion error while drawing simple surface with similar numbers via contourf()

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug

While I try to render the flat surface with only identical numbers, I got the "assertion error" or segfault (depending on CMAKE_BUILD_TYPE). After debugging I found that the guilty line is located at source/matplot/axes_objects/contours.cpp:328 (see "additional info")

Steps to Reproduce

  1. Make simplest example which makes the surfaces with identical numbers;
  2. Try to build it with simplest CMake (like as in bug report template):
# Your steps go here
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
  1. Run it and got an error.

Output

# The output you got

/usr/include/c++/9/bits/stl_vector.h:1224: void std::vector<_Tp, _Alloc>::pop_back() [with _Tp = double; _Alloc = std::allocator<double>]: Assertion '__builtin_expect(!this->empty(), true)' failed.

Platform

  • cross-platform issue - linux
  • cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: Linux CentOS
  • OS Version: 8
  • Compiler: GCC
  • Compiler version: 9.3

Additional context

I suspect that this is a logical error in source/matplot/axes_objects/contours.cpp, line 328.
There could be a case while variable levels could be left in empty state after erasing in line 326, and after that we may try to pop_back() from empty vector, if the parameter ext has value extend_option::both.

Only the last subplot can be operated

Hi,
I am trying to use the subplot function recently.
However, I found out that only the latest subplot can be operated(zoom in/out, ...) in the figure.
This issue also happened in the example code.

Following is my environment:
OS: Ubuntu 18.04
GNU: 5.2

It will be helpful if there is a solution for this issue.
Thanks!

compile error in my own project using matplot++

It is an amazing project and i wish to use it on my own.

The code project is build successfully, and I've test them independently for the examples provided by matplot++. All of them are running ok.

But I've created an empty project simply to test matplot++, CMakeLists.txt are writen like this:

cmake_minimum_required(VERSION 3.10)
project(matplot_test)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_BUILD_TYPE Release)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O2 ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wall -O2 ")

find_package(Matplot++ REQUIRED)

add_executable(matplot_test main.cpp)
target_link_libraries(matplot_test PUBLIC matplot)

And cmake command successful. But there are linking errors when i make them.

//usr/local/lib/libmatplot.a(common.cpp.o): In function `cimg_library::CImg<unsigned char>::_cimg_jpeg_error_exit(jpeg_common_struct*)':
common.cpp:(.text._ZN12cimg_library4CImgIhE21_cimg_jpeg_error_exitEP18jpeg_common_struct[_ZN12cimg_library4CImgIhE21_cimg_jpeg_error_exitEP18jpeg_common_struct]+0x1a): undefined reference to `jpeg_destroy'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `cimg_library::CImg<unsigned char>::_save_jpeg(_IO_FILE*, char const*, unsigned int) const':
common.cpp:(.text._ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj]+0x120): undefined reference to `jpeg_std_error'
common.cpp:(.text._ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj]+0x147): undefined reference to `jpeg_CreateCompress'
common.cpp:(.text._ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj]+0x16d): undefined reference to `jpeg_stdio_dest'
common.cpp:(.text._ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj]+0x197): undefined reference to `jpeg_set_defaults'
common.cpp:(.text._ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj]+0x1b1): undefined reference to `jpeg_set_quality'
common.cpp:(.text._ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj]+0x1be): undefined reference to `jpeg_start_compress'
common.cpp:(.text._ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj]+0x2bf): undefined reference to `jpeg_write_scanlines'
common.cpp:(.text._ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj]+0x2dd): undefined reference to `jpeg_finish_compress'
common.cpp:(.text._ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE10_save_jpegEP8_IO_FILEPKcj]+0x2f2): undefined reference to `jpeg_destroy_compress'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `cimg_library::CImg<unsigned char>::_save_png(_IO_FILE*, char const*, unsigned int) const':
common.cpp:(.text._ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj]+0x2ef): undefined reference to `png_create_write_struct'
common.cpp:(.text._ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj]+0x304): undefined reference to `png_create_info_struct'
common.cpp:(.text._ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj]+0x326): undefined reference to `png_set_longjmp_fn'
common.cpp:(.text._ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj]+0x349): undefined reference to `png_destroy_write_struct'
common.cpp:(.text._ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj]+0x478): undefined reference to `png_init_io'
common.cpp:(.text._ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj]+0x4e4): undefined reference to `png_set_IHDR'
common.cpp:(.text._ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj]+0x4f5): undefined reference to `png_write_info'
common.cpp:(.text._ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj]+0xc30): undefined reference to `png_write_image'
common.cpp:(.text._ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj]+0xc3d): undefined reference to `png_write_end'
common.cpp:(.text._ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj]+0xc4a): undefined reference to `png_destroy_write_struct'
common.cpp:(.text._ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj[_ZNK12cimg_library4CImgIhE9_save_pngEP8_IO_FILEPKcj]+0x1918): undefined reference to `png_destroy_write_struct'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `cimg_library::CImg<unsigned char>::save_cimg(char const*, bool) const':
common.cpp:(.text._ZNK12cimg_library4CImgIhE9save_cimgEPKcb[_ZNK12cimg_library4CImgIhE9save_cimgEPKcb]+0x3a9): undefined reference to `compress'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `cimg_library::CImg<unsigned char>::save(char const*, int, unsigned int) const':
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x11ba): undefined reference to `TIFFOpen'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x11f8): undefined reference to `TIFFClose'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x12b5): undefined reference to `TIFFFileName'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x12de): undefined reference to `TIFFSetDirectory'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x12f0): undefined reference to `TIFFSetField'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x1303): undefined reference to `TIFFSetField'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x1317): undefined reference to `TIFFSetField'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x1332): undefined reference to `TIFFSetField'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x1346): undefined reference to `TIFFSetField'
//usr/local/lib/libmatplot.a(common.cpp.o):common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x13fa): more undefined references to `TIFFSetField' follow
//usr/local/lib/libmatplot.a(common.cpp.o): In function `cimg_library::CImg<unsigned char>::save(char const*, int, unsigned int) const':
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x1471): undefined reference to `TIFFDefaultStripSize'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x1488): undefined reference to `TIFFSetField'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x149c): undefined reference to `TIFFSetField'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x14b2): undefined reference to `TIFFSetField'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x14ba): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x14c2): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x152b): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x15ee): undefined reference to `TIFFWriteEncodedStrip'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x1684): undefined reference to `_TIFFfree'
common.cpp:(.text._ZNK12cimg_library4CImgIhE4saveEPKcij[_ZNK12cimg_library4CImgIhE4saveEPKcij]+0x168c): undefined reference to `TIFFWriteDirectory'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `cimg_library::CImg<unsigned char>::_load_png(_IO_FILE*, char const*, unsigned int*)':
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x84): undefined reference to `png_sig_cmp'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x136): undefined reference to `png_create_read_struct'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x14b): undefined reference to `png_create_info_struct'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x161): undefined reference to `png_create_info_struct'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x183): undefined reference to `png_set_longjmp_fn'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x1b6): undefined reference to `png_destroy_read_struct'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x367): undefined reference to `png_destroy_read_struct'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x3f9): undefined reference to `png_destroy_read_struct'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x489): undefined reference to `png_init_io'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x497): undefined reference to `png_set_sig_bytes'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x4a4): undefined reference to `png_read_info'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x4ce): undefined reference to `png_get_IHDR'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x512): undefined reference to `png_get_valid'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x540): undefined reference to `png_set_filler'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x54d): undefined reference to `png_read_update_info'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x57d): undefined reference to `png_destroy_read_struct'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x621): undefined reference to `png_set_gray_to_rgb'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x641): undefined reference to `png_set_tRNS_to_alpha'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x6ac): undefined reference to `png_read_image'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x6b9): undefined reference to `png_read_end'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x6e9): undefined reference to `png_destroy_read_struct'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x769): undefined reference to `png_set_expand_gray_1_2_4_to_8'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x789): undefined reference to `png_set_palette_to_rgb'
common.cpp:(.text._ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj[_ZN12cimg_library4CImgIhE9_load_pngEP8_IO_FILEPKcPj]+0x914): undefined reference to `png_destroy_read_struct'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_contig<unsigned char>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIhEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIhEEvP4tifftjjjj]+0x33): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIhEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIhEEvP4tifftjjjj]+0x3b): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIhEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIhEEvP4tifftjjjj]+0xaa): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIhEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIhEEvP4tifftjjjj]+0x19d): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIhEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIhEEvP4tifftjjjj]+0x1a9): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIhEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIhEEvP4tifftjjjj]+0x1be): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIhEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIhEEvP4tifftjjjj]+0x186): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_contig<signed char>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIaEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIaEEvP4tifftjjjj]+0x33): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIaEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIaEEvP4tifftjjjj]+0x3b): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIaEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIaEEvP4tifftjjjj]+0xa4): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIaEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIaEEvP4tifftjjjj]+0x18d): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIaEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIaEEvP4tifftjjjj]+0x199): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIaEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIaEEvP4tifftjjjj]+0x1ae): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIaEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIaEEvP4tifftjjjj]+0x176): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_contig<unsigned short>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigItEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigItEEvP4tifftjjjj]+0x33): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigItEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigItEEvP4tifftjjjj]+0x3b): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigItEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigItEEvP4tifftjjjj]+0xa2): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigItEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigItEEvP4tifftjjjj]+0x18f): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigItEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigItEEvP4tifftjjjj]+0x19b): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigItEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigItEEvP4tifftjjjj]+0x1b0): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigItEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigItEEvP4tifftjjjj]+0x178): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_contig<short>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIsEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIsEEvP4tifftjjjj]+0x33): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIsEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIsEEvP4tifftjjjj]+0x3b): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIsEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIsEEvP4tifftjjjj]+0xa2): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIsEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIsEEvP4tifftjjjj]+0x18f): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIsEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIsEEvP4tifftjjjj]+0x19b): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIsEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIsEEvP4tifftjjjj]+0x1b0): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIsEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIsEEvP4tifftjjjj]+0x178): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_contig<unsigned int>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIjEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIjEEvP4tifftjjjj]+0x33): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIjEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIjEEvP4tifftjjjj]+0x3b): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIjEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIjEEvP4tifftjjjj]+0xa2): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIjEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIjEEvP4tifftjjjj]+0x18e): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIjEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIjEEvP4tifftjjjj]+0x19a): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIjEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIjEEvP4tifftjjjj]+0x1af): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIjEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIjEEvP4tifftjjjj]+0x177): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_contig<int>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIiEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIiEEvP4tifftjjjj]+0x33): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIiEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIiEEvP4tifftjjjj]+0x3b): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIiEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIiEEvP4tifftjjjj]+0xa2): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIiEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIiEEvP4tifftjjjj]+0x18e): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIiEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIiEEvP4tifftjjjj]+0x19a): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIiEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIiEEvP4tifftjjjj]+0x1af): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIiEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIiEEvP4tifftjjjj]+0x177): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_contig<float>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIfEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIfEEvP4tifftjjjj]+0x33): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIfEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIfEEvP4tifftjjjj]+0x3b): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIfEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIfEEvP4tifftjjjj]+0xa2): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIfEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIfEEvP4tifftjjjj]+0x190): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIfEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIfEEvP4tifftjjjj]+0x19c): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIfEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIfEEvP4tifftjjjj]+0x1b1): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIfEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIfEEvP4tifftjjjj]+0x179): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_contig<unsigned long>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigImEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigImEEvP4tifftjjjj]+0x33): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigImEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigImEEvP4tifftjjjj]+0x3b): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigImEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigImEEvP4tifftjjjj]+0xa2): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigImEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigImEEvP4tifftjjjj]+0x18e): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigImEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigImEEvP4tifftjjjj]+0x19a): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigImEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigImEEvP4tifftjjjj]+0x1af): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigImEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigImEEvP4tifftjjjj]+0x177): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_contig<long>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIlEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIlEEvP4tifftjjjj]+0x33): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIlEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIlEEvP4tifftjjjj]+0x3b): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIlEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIlEEvP4tifftjjjj]+0xa2): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIlEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIlEEvP4tifftjjjj]+0x18e): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIlEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIlEEvP4tifftjjjj]+0x19a): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIlEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIlEEvP4tifftjjjj]+0x1af): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIlEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIlEEvP4tifftjjjj]+0x177): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_contig<double>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIdEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIdEEvP4tifftjjjj]+0x33): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIdEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIdEEvP4tifftjjjj]+0x3b): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIdEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIdEEvP4tifftjjjj]+0xa2): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIdEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIdEEvP4tifftjjjj]+0x190): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIdEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIdEEvP4tifftjjjj]+0x19c): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIdEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIdEEvP4tifftjjjj]+0x1b1): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIdEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE23_load_tiff_tiled_contigIdEEvP4tifftjjjj]+0x179): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_separate<unsigned char>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIhEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIhEEvP4tifftjjjj]+0x30): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIhEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIhEEvP4tifftjjjj]+0x38): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIhEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIhEEvP4tifftjjjj]+0xbe): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIhEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIhEEvP4tifftjjjj]+0x1b0): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIhEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIhEEvP4tifftjjjj]+0x1bc): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIhEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIhEEvP4tifftjjjj]+0x1d1): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIhEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIhEEvP4tifftjjjj]+0x198): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_separate<unsigned short>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateItEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateItEEvP4tifftjjjj]+0x30): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateItEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateItEEvP4tifftjjjj]+0x38): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateItEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateItEEvP4tifftjjjj]+0xbe): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateItEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateItEEvP4tifftjjjj]+0x1bf): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateItEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateItEEvP4tifftjjjj]+0x1cb): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateItEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateItEEvP4tifftjjjj]+0x1e0): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateItEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateItEEvP4tifftjjjj]+0x1a7): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_separate<unsigned int>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIjEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIjEEvP4tifftjjjj]+0x30): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIjEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIjEEvP4tifftjjjj]+0x38): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIjEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIjEEvP4tifftjjjj]+0xbe): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIjEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIjEEvP4tifftjjjj]+0x1be): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIjEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIjEEvP4tifftjjjj]+0x1ca): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIjEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIjEEvP4tifftjjjj]+0x1df): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIjEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIjEEvP4tifftjjjj]+0x1a6): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_separate<int>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIiEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIiEEvP4tifftjjjj]+0x30): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIiEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIiEEvP4tifftjjjj]+0x38): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIiEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIiEEvP4tifftjjjj]+0xbe): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIiEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIiEEvP4tifftjjjj]+0x1be): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIiEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIiEEvP4tifftjjjj]+0x1ca): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIiEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIiEEvP4tifftjjjj]+0x1df): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIiEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIiEEvP4tifftjjjj]+0x1a6): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_separate<float>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIfEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIfEEvP4tifftjjjj]+0x30): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIfEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIfEEvP4tifftjjjj]+0x38): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIfEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIfEEvP4tifftjjjj]+0xb6): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIfEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIfEEvP4tifftjjjj]+0x1ad): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIfEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIfEEvP4tifftjjjj]+0x1b9): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIfEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIfEEvP4tifftjjjj]+0x1ce): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIfEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIfEEvP4tifftjjjj]+0x195): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_separate<unsigned long>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateImEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateImEEvP4tifftjjjj]+0x30): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateImEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateImEEvP4tifftjjjj]+0x38): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateImEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateImEEvP4tifftjjjj]+0xbe): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateImEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateImEEvP4tifftjjjj]+0x1be): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateImEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateImEEvP4tifftjjjj]+0x1ca): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateImEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateImEEvP4tifftjjjj]+0x1df): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateImEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateImEEvP4tifftjjjj]+0x1a6): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_separate<long>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIlEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIlEEvP4tifftjjjj]+0x30): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIlEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIlEEvP4tifftjjjj]+0x38): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIlEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIlEEvP4tifftjjjj]+0xbe): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIlEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIlEEvP4tifftjjjj]+0x1be): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIlEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIlEEvP4tifftjjjj]+0x1ca): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIlEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIlEEvP4tifftjjjj]+0x1df): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIlEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIlEEvP4tifftjjjj]+0x1a6): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_tiled_separate<double>(tiff*, unsigned short, unsigned int, unsigned int, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIdEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIdEEvP4tifftjjjj]+0x30): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIdEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIdEEvP4tifftjjjj]+0x38): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIdEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIdEEvP4tifftjjjj]+0xb6): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIdEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIdEEvP4tifftjjjj]+0x1ad): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIdEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIdEEvP4tifftjjjj]+0x1b9): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIdEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIdEEvP4tifftjjjj]+0x1ce): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIdEEvP4tifftjjjj[_ZN12cimg_library4CImgIhE25_load_tiff_tiled_separateIdEEvP4tifftjjjj]+0x195): undefined reference to `_TIFFfree'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_contig<unsigned char>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj]+0x3b): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj]+0x43): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj]+0x69): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj]+0xad): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj]+0xc2): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj]+0x195): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj]+0x1c6): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj]+0x1ce): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIhEEvP4tifftjj]+0x1e3): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_contig<signed char>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj]+0x3b): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj]+0x43): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj]+0x69): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj]+0xad): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj]+0xc2): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj]+0x18d): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj]+0x1be): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj]+0x1c6): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIaEEvP4tifftjj]+0x1db): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_contig<unsigned short>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj]+0x3b): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj]+0x43): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj]+0x69): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj]+0xb6): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj]+0xcb): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj]+0x18d): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj]+0x1be): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj]+0x1c6): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigItEEvP4tifftjj]+0x1db): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_contig<short>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj]+0x3b): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj]+0x43): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj]+0x69): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj]+0xb6): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj]+0xcb): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj]+0x18d): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj]+0x1be): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj]+0x1c6): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIsEEvP4tifftjj]+0x1db): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_contig<unsigned int>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj]+0x3b): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj]+0x43): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj]+0x69): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj]+0xb9): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj]+0xce): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj]+0x18d): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj]+0x1be): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj]+0x1c6): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIjEEvP4tifftjj]+0x1db): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_contig<int>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj]+0x3b): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj]+0x43): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj]+0x69): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj]+0xb9): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj]+0xce): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj]+0x18d): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj]+0x1be): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj]+0x1c6): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIiEEvP4tifftjj]+0x1db): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_contig<float>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj]+0x3b): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj]+0x43): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj]+0x6a): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj]+0xb4): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj]+0xca): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj]+0x18e): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj]+0x1c0): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj]+0x1c8): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIfEEvP4tifftjj]+0x1dd): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_contig<unsigned long>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj]+0x3b): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj]+0x43): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj]+0x69): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj]+0xb9): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj]+0xce): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj]+0x18d): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj]+0x1be): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj]+0x1c6): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigImEEvP4tifftjj]+0x1db): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_contig<long>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj]+0x3b): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj]+0x43): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj]+0x69): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj]+0xb9): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj]+0xce): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj]+0x18d): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj]+0x1be): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj]+0x1c6): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIlEEvP4tifftjj]+0x1db): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_contig<double>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj]+0x3b): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj]+0x43): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj]+0x6a): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj]+0xb4): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj]+0xca): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj]+0x18e): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj]+0x1c0): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj]+0x1c8): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE17_load_tiff_contigIdEEvP4tifftjj]+0x1dd): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_separate<unsigned char>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj]+0x33): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj]+0x3b): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj]+0x65): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj]+0xbc): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj]+0xd2): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj]+0x181): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj]+0x1b3): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj]+0x1bb): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIhEEvP4tifftjj]+0x1d0): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_separate<signed char>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj]+0x33): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj]+0x3b): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj]+0x65): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj]+0xbc): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj]+0xd2): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj]+0x17f): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj]+0x1b1): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj]+0x1b9): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIaEEvP4tifftjj]+0x1ce): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_separate<unsigned short>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj]+0x37): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj]+0x3f): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj]+0x66): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj]+0xd8): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj]+0xee): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj]+0x1a1): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj]+0x1cc): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj]+0x1d8): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateItEEvP4tifftjj]+0x1ed): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_separate<short>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj]+0x37): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj]+0x3f): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj]+0x66): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj]+0xd8): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj]+0xee): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj]+0x1a1): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj]+0x1cc): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj]+0x1d8): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIsEEvP4tifftjj]+0x1ed): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_separate<unsigned int>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj]+0x37): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj]+0x3f): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj]+0x66): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj]+0xe0): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj]+0xf6): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj]+0x1a8): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj]+0x1d3): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj]+0x1df): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIjEEvP4tifftjj]+0x1f4): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_separate<int>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj]+0x37): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj]+0x3f): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj]+0x66): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj]+0xe0): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj]+0xf6): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj]+0x1a8): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj]+0x1d3): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj]+0x1df): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIiEEvP4tifftjj]+0x1f4): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_separate<float>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj]+0x37): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj]+0x3f): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj]+0x66): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj]+0xdd): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj]+0xf3): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj]+0x199): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj]+0x1c4): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj]+0x1d0): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIfEEvP4tifftjj]+0x1e5): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_separate<unsigned long>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj]+0x37): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj]+0x3f): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj]+0x66): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj]+0xe0): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj]+0xf6): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj]+0x1a8): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj]+0x1d3): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj]+0x1df): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateImEEvP4tifftjj]+0x1f4): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_separate<long>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj]+0x37): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj]+0x3f): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj]+0x66): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj]+0xe0): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj]+0xf6): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj]+0x1a8): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj]+0x1d3): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj]+0x1df): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIlEEvP4tifftjj]+0x1f4): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `void cimg_library::CImg<unsigned char>::_load_tiff_separate<double>(tiff*, unsigned short, unsigned int, unsigned int)':
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj]+0x37): undefined reference to `TIFFStripSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj]+0x3f): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj]+0x66): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj]+0xdd): undefined reference to `TIFFComputeStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj]+0xf3): undefined reference to `TIFFReadEncodedStrip'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj]+0x199): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj]+0x1c4): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj]+0x1d0): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj[_ZN12cimg_library4CImgIhE19_load_tiff_separateIdEEvP4tifftjj]+0x1e5): undefined reference to `TIFFFileName'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `cimg_library::CImg<unsigned char>::_load_tiff(tiff*, unsigned int, float*, cimg_library::CImg<char>*)':
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x3a): undefined reference to `TIFFSetDirectory'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0xc9): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0xdf): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0xf5): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x108): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x11b): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x12e): undefined reference to `TIFFGetFieldDefaulted'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x141): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x17f): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x25a): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x274): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x2bc): undefined reference to `TIFFGetField'
//usr/local/lib/libmatplot.a(common.cpp.o):common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x3ea): more undefined references to `TIFFGetField' follow
//usr/local/lib/libmatplot.a(common.cpp.o): In function `cimg_library::CImg<unsigned char>::_load_tiff(tiff*, unsigned int, float*, cimg_library::CImg<char>*)':
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x3f2): undefined reference to `TIFFIsTiled'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x4cd): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x4e0): undefined reference to `TIFFGetField'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x597): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x59f): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x64e): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x737): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x774): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x794): undefined reference to `TIFFReadRGBAImage'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x7ba): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0xac6): undefined reference to `TIFFTileSize'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0xace): undefined reference to `_TIFFmalloc'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0xb7e): undefined reference to `TIFFReadTile'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0xfb9): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0xfc1): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0xfd6): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x1044): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x104c): undefined reference to `TIFFClose'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x1061): undefined reference to `TIFFFileName'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x11ce): undefined reference to `_TIFFfree'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE10_load_tiffEP4tiffjPfPNS0_IcEE]+0x11d6): undefined reference to `TIFFClose'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `cimg_library::CImg<unsigned char>::load_tiff(char const*, unsigned int, unsigned int, unsigned int, float*, cimg_library::CImg<char>*)':
common.cpp:(.text._ZN12cimg_library4CImgIhE9load_tiffEPKcjjjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE9load_tiffEPKcjjjPfPNS0_IcEE]+0x78): undefined reference to `TIFFSetWarningHandler'
common.cpp:(.text._ZN12cimg_library4CImgIhE9load_tiffEPKcjjjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE9load_tiffEPKcjjjPfPNS0_IcEE]+0x7f): undefined reference to `TIFFSetErrorHandler'
common.cpp:(.text._ZN12cimg_library4CImgIhE9load_tiffEPKcjjjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE9load_tiffEPKcjjjPfPNS0_IcEE]+0x8e): undefined reference to `TIFFOpen'
common.cpp:(.text._ZN12cimg_library4CImgIhE9load_tiffEPKcjjjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE9load_tiffEPKcjjjPfPNS0_IcEE]+0xb7): undefined reference to `TIFFReadDirectory'
common.cpp:(.text._ZN12cimg_library4CImgIhE9load_tiffEPKcjjjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE9load_tiffEPKcjjjPfPNS0_IcEE]+0x249): undefined reference to `TIFFSetDirectory'
common.cpp:(.text._ZN12cimg_library4CImgIhE9load_tiffEPKcjjjPfPNS0_IcEE[_ZN12cimg_library4CImgIhE9load_tiffEPKcjjjPfPNS0_IcEE]+0x628): undefined reference to `TIFFClose'
//usr/local/lib/libmatplot.a(common.cpp.o): In function `cimg_library::CImgList<unsigned char>::_load_cimg(_IO_FILE*, char const*)':
common.cpp:(.text._ZN12cimg_library8CImgListIhE10_load_cimgEP8_IO_FILEPKc[_ZN12cimg_library8CImgListIhE10_load_cimgEP8_IO_FILEPKc]+0x3ed): undefined reference to `uncompress'
common.cpp:(.text._ZN12cimg_library8CImgListIhE10_load_cimgEP8_IO_FILEPKc[_ZN12cimg_library8CImgListIhE10_load_cimgEP8_IO_FILEPKc]+0x6f4): undefined reference to `uncompress'
common.cpp:(.text._ZN12cimg_library8CImgListIhE10_load_cimgEP8_IO_FILEPKc[_ZN12cimg_library8CImgListIhE10_load_cimgEP8_IO_FILEPKc]+0x91b): undefined reference to `uncompress'
common.cpp:(.text._ZN12cimg_library8CImgListIhE10_load_cimgEP8_IO_FILEPKc[_ZN12cimg_library8CImgListIhE10_load_cimgEP8_IO_FILEPKc]+0xd1c): undefined reference to `uncompress'
common.cpp:(.text._ZN12cimg_library8CImgListIhE10_load_cimgEP8_IO_FILEPKc[_ZN12cimg_library8CImgListIhE10_load_cimgEP8_IO_FILEPKc]+0x1164): undefined reference to `uncompress'
//usr/local/lib/libmatplot.a(common.cpp.o):common.cpp:(.text._ZN12cimg_library8CImgListIhE10_load_cimgEP8_IO_FILEPKc[_ZN12cimg_library8CImgListIhE10_load_cimgEP8_IO_FILEPKc]+0x15aa): more undefined references to `uncompress' follow
//usr/local/lib/libmatplot.a(common.cpp.o): In function `cimg_library::CImg<unsigned char>::_load_jpeg(_IO_FILE*, char const*)':
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc[_ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc]+0x66): undefined reference to `jpeg_std_error'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc[_ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc]+0x135): undefined reference to `jpeg_CreateDecompress'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc[_ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc]+0x144): undefined reference to `jpeg_stdio_src'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc[_ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc]+0x151): undefined reference to `jpeg_read_header'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc[_ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc]+0x159): undefined reference to `jpeg_start_decompress'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc[_ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc]+0x34c): undefined reference to `jpeg_read_scanlines'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc[_ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc]+0x4c6): undefined reference to `jpeg_finish_decompress'
common.cpp:(.text._ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc[_ZN12cimg_library4CImgIhE10_load_jpegEP8_IO_FILEPKc]+0x4d2): undefined reference to `jpeg_destroy_decompress'
//usr/local/lib/libmatplot.a(network.cpp.o): In function `matplot::network::process_force_layout()':
network.cpp:(.text+0x1fd8): undefined reference to `nodesoup::size_radiuses(std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > > const&, double, double)'
network.cpp:(.text+0x20b1): undefined reference to `nodesoup::fruchterman_reingold(std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > > const&, unsigned int, unsigned int, unsigned int, double, std::function<void (std::vector<nodesoup::Point2D, std::allocator<nodesoup::Point2D> > const&, int)>)'
//usr/local/lib/libmatplot.a(network.cpp.o): In function `matplot::network::process_kawai_layout()':
network.cpp:(.text+0x2738): undefined reference to `nodesoup::size_radiuses(std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > > const&, double, double)'
network.cpp:(.text+0x27ff): undefined reference to `nodesoup::kamada_kawai(std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > > const&, unsigned int, unsigned int, double, double)'
//usr/local/lib/libmatplot.a(gnuplot.cpp.o): In function `matplot::backend::gnuplot::output(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
gnuplot.cpp:(.text+0x2ae9): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
gnuplot.cpp:(.text+0x2b00): undefined reference to `std::filesystem::__cxx11::path::parent_path() const'
gnuplot.cpp:(.text+0x2c0f): undefined reference to `std::filesystem::__cxx11::path::parent_path() const'
gnuplot.cpp:(.text+0x2c17): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
gnuplot.cpp:(.text+0x2c45): undefined reference to `std::filesystem::__cxx11::path::parent_path() const'
gnuplot.cpp:(.text+0x2c4d): undefined reference to `std::filesystem::create_directory(std::filesystem::__cxx11::path const&)'
gnuplot.cpp:(.text+0x2c60): undefined reference to `std::filesystem::__cxx11::path::parent_path() const'
gnuplot.cpp:(.text+0x2c68): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
gnuplot.cpp:(.text+0x2ca8): undefined reference to `std::filesystem::__cxx11::path::parent_path() const'
//usr/local/lib/libmatplot.a(gnuplot.cpp.o): In function `matplot::backend::gnuplot::output(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
gnuplot.cpp:(.text+0x3cd5): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
//usr/local/lib/libmatplot.a(gnuplot.cpp.o): In function `std::filesystem::__cxx11::path::extension() const':
gnuplot.cpp:(.text._ZNKSt10filesystem7__cxx114path9extensionEv[_ZNKSt10filesystem7__cxx114path9extensionEv]+0x23): undefined reference to `std::filesystem::__cxx11::path::_M_find_extension() const'
gnuplot.cpp:(.text._ZNKSt10filesystem7__cxx114path9extensionEv[_ZNKSt10filesystem7__cxx114path9extensionEv]+0xc1): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
collect2: error: ld returned 1 exit status
CMakeFiles/matplot_test.dir/build.make:102: recipe for target 'matplot_test' failed
make[2]: *** [matplot_test] Error 1
CMakeFiles/Makefile2:94: recipe for target 'CMakeFiles/matplot_test.dir/all' failed
make[1]: *** [CMakeFiles/matplot_test.dir/all] Error 2
Makefile:102: recipe for target 'all' failed
make: *** [all] Error 2

Could you please solve this problem for me ? Thanks

Environment Details:

  • OS: Ubuntu
  • OS Version: 18.04
  • Compiler: gcc/g++
  • Compiler version: 8.4.0

Additional context

Plotting 2D matrix with image() function takes 30 minutes

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug
I'm trying to plot a 2D grid using the matplot::image() function, but for reasons unbeknownst to me, it literally takes 30 minutes to produce the expected output. I have a std::vector<std::vector<int8_t>> called occupancy_grid_map that has 4000 rows and 4000 cols, and plot it using the following code inside a larger function:

matplot::image(occupancy_grid_map);
matplot::show();

When the above code runs, it initially produces a blank/white plot window. However, after 30 minutes, this blank plot window is finally replaced by the expected 2D image plot. Looking at the processes that run during the 30 minute waiting period, I see that gnuplot runs at 100% throughout this time, so it seems that this might be where the problem could lie (I have gnuplot 5.2 patchlevel 2).

If you'd like me to do some more experiments I'd be more than happy to, since I'm very excited about this library and would hate to be unable to use it due to performance issues like this.

Platform

  • cross-platform issue - linux
  • cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: Ubuntu
  • OS Version: 18.04
  • Compiler: g++
  • Compiler version: 10.1.0

Typos in "Installing" Documentation

The 5 lines for installation from the "Installing" section in README.md didn't run for me as written (using CMake 3.16.3 on Ubuntu 20.04). There seems to be the following typos in these lines:

  • In line 3, -BUILD_TESTS=OFF is missing a D. I think it should be -DBUILD_TESTS=OFF.
  • In line 5, I think cmake --install should be cmake --install . with a period at the end.

In addition, I had to add the option -DBUILD_SHARED_LIBS=ON to line 3 and append /usr/local/lib/ to LD_LIBRARY_PATH for my custom C++ executables to run correctly when importing and using Matplot++.

This probably isn't a big deal for more experienced CMake users, but it took me a little while to figure out why my custom C++ executables using Matplot++ weren't compiling / running.

Thanks for creating this library! Looking forward to using it.

LNK1104 cannot open file '..\..\..\..\source\matplot\Debug\matplot.lib'

Describe the bug

Build ALL_BUILD failed in vs2019 on windows10

Steps to Reproduce
md build
cd build
cmake ..

Then open matplotplusplus.sln in vs2019, click build
Output

Severity	Code	Description	Project	Path	File	Line	Suppression State
Error	LNK1104	cannot open file '..\..\..\..\source\matplot\Debug\matplot.lib'	example_lighting_2	C:\Users\songy\cloud\matplotplusplus\build\examples\appearance\camera\lighting	C:\Users\songy\cloud\matplotplusplus\build\examples\appearance\camera\lighting\LINK	1	
Error	LNK1104	cannot open file '..\..\..\..\source\matplot\Debug\matplot.lib'	example_lighting_3	C:\Users\songy\cloud\matplotplusplus\build\examples\appearance\camera\lighting	C:\Users\songy\cloud\matplotplusplus\build\examples\appearance\camera\lighting\LINK	1	
Error	LNK1104	cannot open file '..\..\..\..\source\matplot\Debug\matplot.lib'	example_lighting_5	C:\Users\songy\cloud\matplotplusplus\build\examples\appearance\camera\lighting	C:\Users\songy\cloud\matplotplusplus\build\examples\appearance\camera\lighting\LINK	1	

Environment:

  • OS: Windows10
  • Compiler: MSVC
  • Compiler version: 19.28.29213.0

Additional context
cmake .. output:

-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.20206.
-- The C compiler identification is MSVC 19.28.29213.0
-- The CXX compiler identification is MSVC 19.28.29213.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.28.29213/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Preview/VC/Tools/MSVC/14.28.29213/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMAKE_MODULE_PATH=C:/Users/songy/cloud/matplotplusplus/cmake
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
-- Found ZLIB: C:/Users/songy/cloud/vcpkg/installed/x86-windows/lib/zlib.lib (found version "1.2.11")
ZLIB Found
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Could NOT find BLAS (missing: BLAS_LIBRARIES)
-- LAPACK requires BLAS
-- A library with LAPACK API not found. Please specify library location.
-- Could NOT find BLAS (missing: BLAS_LIBRARIES)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find FFTW (missing: FFTW_INCLUDE_DIRS)
-- Looking for C++ include filesystem
-- Looking for C++ include filesystem - found
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED - Success
-- Looking for __fbufsize
-- Looking for __fbufsize - not found
-- Looking for min
-- Looking for min - found
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/songy/cloud/matplotplusplus/build

call to legend(...) function causes the figure to go blank

Bug category

  • bug - runtime error

Describe the bug
I was trying to run the script:

using namespace matplot;
auto rdm = rand(4, 4, 0, 1);
plot(rdm);
auto lgd = legend("Line 1", "Line 2", "Line 3", "Line 4");
lgd->font_size(12);
lgd->text_color("blue");
lgd->num_columns(2);
wait();

This is the content of the legend_8.cpp file (with show() replaced by wait() - when i try to use show() i get an error "error: ‘show’ was not declared in this scope").

The plot() function works OK - the plot is shown and I can see it (after pausing before calling legend() ), but the legend() function causes the whole figure to go blank.
The figure goes blank after fflush(pipe_); in matplotplusplus/source/matplot/backend/gnuplot.cpp:

bool gnuplot::flush_commands() {
        if constexpr (dont_let_it_close_too_fast) {
            last_flush_ = std::chrono::high_resolution_clock::now();
        }
        fputs("\n", pipe_);
        fflush(pipe_);
        if constexpr (trace_commands) {
            std::cout << "\n\n\n\n" << std::endl;
        }
        return true;
    }

Each of the lines
auto lgd = legend("Line 1", "Line 2", "Line 3", "Line 4");
lgd->font_size(12);
lgd->text_color("blue");
lgd->num_columns(2);
results in a "line X: undefined variable: keyentry" error log.

The buffer before flushing seems to contain the following data:
"reset\nset terminal qt title "Figure 1"\nset terminal qt title "Figure 1" size 560,420 enhanced font "Helvetica,10"\nset multiplot\nset object 1 rectangle from screen 0,0 to screen 1,1 behind fillcolor rgb "0x00EFEFEF" fillstyle solid 1.0 noborder\n # Axes position\n set origin 0.130000,0.110000\n set size 0.775,0.815\n set lmargin at screen 0.13\n set rmargin at screen 0.905\n set bmargin at screen 0.11\n set tmargin at screen 0.925\n # Axes title\n unset title\n # Axes box\n set border 15 linecolor "black" linewidth 0.5\n set format x "%g"\n set xtics textcolor "0x00262626" font "Helvetica,10" nomirror in scale 0.75 \n unset xzeroaxis\n unset x2tics\n unset x2zeroaxis\n set format y "%g"\n set ytics textcolor "0x00262626" font "Helvetica,10" nomirror in scale 0.75 \n unset yzeroaxis\n unset y2tics\n unset y2zeroaxis\n unset colorbox\n # Axes ranges\n set xrange [:] noreverse\n set yrange [:] noreverse\n set y2range [:] noreverse\n # Axes scale\n # Axes labels\n # Axes legend\n set key on font "Helvetica,11" textcolor rgb 'black' inside right top vertical Left opaque reverse noinvert width 1 noautotitle box linecolor rgb "black" dashtype 1 linewidth 0.5 linetype -1\n # Axes background\n set object 2 rectangle from graph 0,0 to graph 1,1 behind fillcolor rgb "white" fillstyle solid 1.0 noborder\n # Axes objects\n \n plot '-' with line linecolor rgb "0x000071BC" dashtype 1 linewidth 0.5 linetype -1,\\n '-' with line linecolor rgb "0x00D85218" dashtype 1 linewidth 0.5 linetype -1,\\n '-' with line linecolor rgb "0x00ECB01F" dashtype 1 linewidth 0.5 linetype -1,\\n '-' with line linecolor rgb "0x007D2E8D" dashtype 1 linewidth 0.5 linetype -1, keyentry with line linecolor rgb "0x000071BC" dashtype 1 linewidth 0.5 linetype -1 title "Line 1", keyentry with line linecolor rgb "0x00D85218" dashtype 1 linewidth 0.5 linetype -1 title "Line 2", keyentry with line linecolor rgb "0x00ECB01F" dashtype 1 linewidth 0.5 linetype -1 title "Line 3", keyentry with line linecolor rgb "0x007D2E8D" dashtype 1 linewidth 0.5 linetype -1 title "Line 4"\n 1 0.571241 \n 2 0.726632 \n 3 0.906632 \n 4 0.720572 \n e\n\n 1 0.312834 \n 2 0.689955 \n 3 0.587253 \n 4 0.464875 \n e\n\n 1 0.280091 \n 2 0.280318 \n 3 0.637555 \n 4 0.156573 \n e\n\n 1 0.125977 \n 2 0.992371 \n 3 0.916899 \n 4 0.733797 \n e\n\n \nunset object 1\nunset multiplot\n"

Output

qt5ct: using qt5ct plugin
           line 46: undefined variable: keyentry

           line 69: undefined variable: keyentry

           line 92: undefined variable: keyentry

           line 115: undefined variable: keyentry

Platform

  • cross-platform issue - linux

Linux 4.15.0-64-generic x86_64
NAME="Linux Mint"
VERSION="19 (Tara)"

Unable to hide the colorbar

Hi,

First of all, thanks for creating this library 🙂. I have a question about hiding a colorbar in a 3D scatterplot (but this may apply to other types of plots as well). When I set the axes visibility to false, a colorbar appears. I can't seem to hide it, despite calling the appropriate functions for doing so. This only happens when passing color labels to scatter3.

I'm not sure if this is a bug. If not, how can I hide the colorbar?
Full working example below (adapted from example_scatter3_5):

#include <matplot/matplot.h>
#include <random>
#include <tuple>

int main() {
    using namespace matplot;

    auto z = linspace(0, 4 * pi, 250);
    auto x = transform(z, [](double z) { return 2 * cos(z) + rand(0, 1); });
    auto y = transform(z, [](double z) { return 2 * sin(z) + rand(0, 1); });

    std::vector<double> sizes(x.size(), 5);
    std::vector<double> colors(x.size() / 2, 1);
    std::fill_n(std::back_inserter(colors), x.size() / 2, 2);

    scatter3(x, y, z, sizes, colors, "filled");
    colormap(palette::paired());

    auto ax1 = gca();

    // Hide the x, y, z axes. This causes a colorbar to appear.
    // The colorbar only appears when colors is passed to scatter3
    ax1->visible(false);

    colorbar(off); // Doesn't work
    colorbar().visible(false); // Doesn't work either

    view(-30, 10);

    show();
    return 0;
}

colorbar

Adding release tags

Hello,
I would like to thank you for this amazing library, it is wonderful!

I am really interested in getting notifications about the releases of this library. I could select Watch to get all the notifications (issues, etc.). However, because currently there are no release tag and there are a lot of notifications, could you please add release tags to the library so one could choose to get notifications about releases only?

I appreciate your work
My best regards

Cimg linker error

Describe the bug
Unable to compile due to linker error.

Steps to Reproduce

  1. Matplot++ folder is seperated from my code (no using add subdirectory)
  2. make && make install matplot++ package.
  3. Attempt to use matplot++ package on my code.

Output

/usr/bin/ld: cannot find -lcimg

Environment:

  • OS: 18.04
  • Compiler: g++ and clang++
  • Compiler version: 10

Additional context
Currently I am able to both make and make install matplot++. However, when I tried using it on my code, I got linking error regarding cimg. Previous I am able to compile my code by just having the following in my CMakeLists.txt.

find_package(Matplot++)
find_package(Filesystem) 

add_executable(run main.cpp)
target_link_libraries(run PUBLIC Matplot++::matplot)

However, if I'm using similar CMakeLists.txt now, I'm having linker error of cimg. I think it might be related with this. Thus, if possible, I would like to ask what else do I need to add in my CMakeLists.txt in order to not having this error.

How to install the library on the global system

Hello,
I've downloaded the library, and compiled it. but how to install it on the system? I mean something like:

sudo make install

Or do I have to compile this library for every project I use?
Please give more details on how to install the dependencies, (even the extra libraries) like GLAD. etc.

Thanks

Undefined references to Xrandr libraries

When linking the examples, there are multiple undefined references to Xrandr libraries.

The solution is to link X11::Xrandr in source/matplot/FindDependencies.cmake like so:

if(X11_FOUND)
  ...
  target_link_libraries(cimg INTERFACE X11::Xrandr)
  ...
endif()

See FindX11

Default font is not cross platform

When plotting with gnuplot on windows, Helvetica is not available by default. Would it be ok to use alternative on Windows?

.\example_plot_1.exe

(process:23384): Pango-WARNING **: 17:16:06.198: couldn't load font "Helvetica Not-Rotated 200", falling back to "Sans Not-Rotated 200", expect ugly output.

Compilation error: ERROR: EXTERNAL LIBRARY 'GLAD' NOT FOUND

Hello
I am trying to compile the library as follows:

git clone https://github.com/alandefreitas/matplotplusplus.git
cd matplotlibplusplut
mkdir build && cd $_
cmake ..

I got the following error:


-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMAKE_MODULE_PATH=/tmp/allwork/matplotplusplus/cmake
-- CPM: adding package [email protected] (4bcd8cd2d6c963ccf053f8c19dbb63c065467527)
-- CPM: adding package [email protected] (v.221)
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (found version "80") 
JPEG Found
-- Found TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (found version "4.1.0") 
TIFF Found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
ZLIB Found
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.6.37") 
PNG Found
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: /usr/lib/x86_64-linux-gnu/libblas.so  
-- Looking for cheev_
-- Looking for cheev_ - not found
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
LAPACK Found
BLAS Found
-- Found FFTW: /usr/include   
FFTW Found
-- Checking for module 'OpenEXR'
--   Found OpenEXR, version 2.3.0
OPENEXR Found
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Looking for C++ include filesystem
-- Looking for C++ include filesystem - found
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED - Success
-- Looking for __fbufsize
-- Looking for __fbufsize - found
-- Looking for min
-- Looking for min - not found
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so   
ERROR: EXTERNAL LIBRARY 'GLAD' NOT FOUND
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/allwork/matplotplusplus/build

Not compatible with gnuplot 5.4.1 in Win10 ?

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug

I installed Gnuplot 5.4.1 and run any sample in this project, the Gnuplot window came up (with the correct result) BUT frozen (no response, I can't control the window).

And I try to down ground Gnuplot to 5.2.8, everything is fine.

Is it not compatible with Gnuplot 5.4.1?

Platform

  • cross-platform issue - linux
  • cross-platform issue - windows
  • cross-platform issue - macos

Error compiling with NVCC

I am trying to use Matplot++ in a project heavily dependent on CUDA, so I am compiling with NVCC. And I get this error.

_deps/matplot-src/source/matplot/core/axes_type.h:2790:38: error: ‘colormap_palette’ has not been declared 2790 | std::vector<std::vector<double>> colormap_{palette::default_map()};
The code is fine. It is NVCC that is erroneous. But a simple fix is to initialize the colormap_ using

std::vector<std::vector<double>> colormap_ = {palette::default_map()};

Bug catergory - compilation error
Platform - Linux

Environment Details:

  • OS: Manjaro Linux
  • Compiler: NVCC v11.1.105 (g++ v10.2.0 for host code)

Assertion failed then running the contourf examples

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug

While trying to run any contourf example, I got an assertion error.
Steps to Reproduce

# Your steps go here
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
./build/examples/contour_plots/contour/example_contour_1

Output

# The output you got
/usr/include/c++/9/bits/stl_vector.h:1042: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = double; _Alloc = std::allocator<double>; std::vector<_Tp, _Alloc>::reference = double&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.

Platform

  • cross-platform issue - linux
  • cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: CentOS
  • OS Version: 8
  • Compiler: GCC
  • Compiler version: 9.3.1

Additional context

While debugging, I found the out-of-bounds error at matplot/axes_objects/contours.cpp:1647; I'll fix it in the PR (#76).

On ubunto Cmake returns: CMake Error at cmake/FindFilesystem.cmake:246 (message):

-- Looking for IceConnectionNumber in ICE - found -- Looking for C++ include filesystem -- Looking for C++ include filesystem - not found CMake Error at cmake/FindFilesystem.cmake:246 (message): Cannot run simple program using std::filesystem Call Stack (most recent call first): source/matplot/CMakeLists.txt:1 (find_package)

Non-identical images after the second try of plotting the same matrices data

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug

I found this bug suddenly while accidentally run test cases two times in my own project. The simplified reproducible example I placed in gist: https://gist.github.com/leha-bot/13d4790cc76bb05dd8b376a1fdd6e7ec
After launching this example we could see that there are strange grid lines in "second_try_stdvec_1d.png" result file.

Steps to Reproduce

c++ matplot-gist.cpp
./a.out

Output
(from linux version, skip Windows version for brevity as it is similar to Linux)

           line 59: warning: Skipping data file with no valid points
Warning: empty cb range [10:10], adjusting to [9.9:10.1]
           line 106: warning: Skipping data file with no valid points
Warning: empty cb range [10:10], adjusting to [9.9:10.1]
           line 163: warning: Skipping data file with no valid points
Warning: empty cb range [10:10], adjusting to [9.9:10.1]
           line 210: warning: Skipping data file with no valid points
Warning: empty cb range [10:10], adjusting to [9.9:10.1]

Platform

  • cross-platform issue - linux
  • cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: CentOS / Fedora / Windows
  • OS Version: CentOS 8 / Fedora 33 / Windows 10 1809
  • Compiler: GCC / MSVC
  • Compiler version: GCC 8.3 / GCC 10.2 / MSVC 2019 16.8

Additional context

I suspect that the gca()'s internal representation of axes labels, ranges and grids has being corrupting somewhere while running test cases.

Add make uninstall target

Feature category

  • enhancement - build system
  • enhancement - backends
  • enhancement - documentation
  • enhancement - plot categories

The problem

After installing matplotplusplus there is no easy way to remove the installed files from my system.

The solution I'd like
Having a make uninstall target results in an easy way to remove the installed files.

Alternatives I've considered
N/A

Additional context

Subplots crashing into each other

Sorry if this is a noob question, but I made a graph with three subplots and they are visually colliding with each other:
image
Any idea how to fix this? Using gnuplot backend on Windows. Thanks!

About contour_plots

Hi, everyone,

I find the contour_plots/* have problems that the results are arbitrary. I have tested all of the others and the results are ok. Is there anybody find the contour_plots problem in this version.

Finite

cimg_display error when compiling from source

Hi,
Thank you for sharing this great project. I am attempting to compile matplot++ from source, however, I have faced some error as follows
clang: error: no such file or directory: 'cimg_display=0'

Operating System: Ubuntu 18.04
CMake Version: 3.18
Clang: clang++10
The following is CMake terminal output.

CMAKE_MODULE_PATH=/home/user/develop/libraries/matplotplusplus/cmake
-- CPM: adding package [email protected] (4bcd8cd2d6c963ccf053f8c19dbb63c065467527)
-- CPM: adding package [email protected] (v.221)
JPEG Found
TIFF Found
ZLIB Found
PNG Found
-- A library with LAPACK API found.
LAPACK Found
BLAS Found
FFTW Found
OPENEXR Found
-- Checking for module 'Magick++'
--   Found Magick++, version 6.9.7
MAGICK Found
-- CPM: adding package [email protected] (df8e9e16110b305479a875399cee13daa0ccadd9)
-- CPM: adding package [email protected] (3.3.2)
-- Using X11 for window creation
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/develop/libraries/matplotplusplus/build

May I know how can I edit the setting to compile successfully?

Assertion failed then building the simple example with peaks()

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug

While trying to make the example at CentOS 8, I've got an assertion error

Steps to Reproduce
Try to build the library and examples.

# Your steps go here
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug

Output

# The output you got
/usr/include/c++/9/bits/stl_vector.h:1042: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = double; _Alloc = std::allocator<double>; std::vector<_Tp, _Alloc>::reference = double&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.

Platform

  • cross-platform issue - linux
  • cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: CentOS
  • OS Version: 8.1
  • Compiler: GCC
  • Compiler version: 9.3

Additional context
My stdlib is build with fortified sources and I dived into debugging and found that the peaks()' internal representation as mesh contains the "nan" value (which , as I understood used as delimiter between parent/child nodes) and this nan is located at bound of mesh's storage.
After debugging, I found that the guilty out-of-range access happens at file matplot/axes_objects/contours.cpp, line 1023.

I made a fix (#72) which simply checks for bounds of j.

Undefined reference in matplot.lib with Visual Studio 2017

Bug category

  • [x ] bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug

int main(int argc, char **argv) {
    using namespace matplot;
    std::vector<double> x = linspace(0, 2 * pi);
    std::vector<double> y = transform(x, [](auto x) { return sin(x); });
    plot(x, y, "-o");
    show();
    return 0;
}

I am trying to compile this project (which works fine with MinGW) with Visual Studio 2017 and I get the following link 'unresolved symbol' errors:

80>matplot.lib(network.obj) : error LNK2019: symbole externe non résolu "class std::vector<struct nodesoup::Point2D,class std::allocator<struct nodesoup::Point2D> > __cdecl nodesoup::fruchterman_reingold(class std::vector<class std::vector<unsigned __int64,class std::allocator<unsigned __int64> >,class std::allocator<class std::vector<unsigned __int64,class std::allocator<unsigned __int64> > > > const &,unsigned int,unsigned int,unsigned int,double,class std::function<void __cdecl(class std::vector<struct nodesoup::Point2D,class std::allocator<struct nodesoup::Point2D> > const &,int)>)" (?fruchterman_reingold@nodesoup@@YA?AV?$vector@UPoint2D@nodesoup@@V?$allocator@UPoint2D@nodesoup@@@std@@@std@@AEBV?$vector@V?$vector@_KV?$allocator@_K@std@@@std@@V?$allocator@V?$vector@_KV?$allocator@_K@std@@@std@@@2@@3@IIINV?$function@$$A6AXAEBV?$vector@UPoint2D@nodesoup@@V?$allocator@UPoint2D@nodesoup@@@std@@@std@@H@Z@3@@Z) référencé dans la fonction "protected: void __cdecl matplot::network::process_force_layout(void)" (?process_force_layout@network@matplot@@IEAAXXZ)
80>matplot.lib(network.obj) : error LNK2019: symbole externe non résolu "class std::vector<struct nodesoup::Point2D,class std::allocator<struct nodesoup::Point2D> > __cdecl nodesoup::kamada_kawai(class std::vector<class std::vector<unsigned __int64,class std::allocator<unsigned __int64> >,class std::allocator<class std::vector<unsigned __int64,class std::allocator<unsigned __int64> > > > const &,unsigned int,unsigned int,double,double)" (?kamada_kawai@nodesoup@@YA?AV?$vector@UPoint2D@nodesoup@@V?$allocator@UPoint2D@nodesoup@@@std@@@std@@AEBV?$vector@V?$vector@_KV?$allocator@_K@std@@@std@@V?$allocator@V?$vector@_KV?$allocator@_K@std@@@std@@@2@@3@IINN@Z) référencé dans la fonction "protected: void __cdecl matplot::network::process_kawai_layout(void)" (?process_kawai_layout@network@matplot@@IEAAXXZ)
80>matplot.lib(network.obj) : error LNK2019: symbole externe non résolu "class std::vector<double,class std::allocator<double> > __cdecl nodesoup::size_radiuses(class std::vector<class std::vector<unsigned __int64,class std::allocator<unsigned __int64> >,class std::allocator<class std::vector<unsigned __int64,class std::allocator<unsigned __int64> > > > const &,double,double)" (?size_radiuses@nodesoup@@YA?AV?$vector@NV?$allocator@N@std@@@std@@AEBV?$vector@V?$vector@_KV?$allocator@_K@std@@@std@@V?$allocator@V?$vector@_KV?$allocator@_K@std@@@std@@@2@@3@NN@Z) référencé dans la fonction "protected: void __cdecl matplot::network::process_force_layout(void)" (?process_force_layout@network@matplot@@IEAAXXZ)
80>D:\Dev\compil\EyeDee-vs\bin\RelWithDebInfo\ETSimple.exe : fatal error LNK1120: 3 externes non résolus

Steps to Reproduce

find_library(my_matplot matplot HINTS ${possible_lib_paths} NO_DEFAULT_PATH) # correctly found
target_link_libraries(my_target PUBLIC my_matplot )

which lead to the above errors.

Alternatively, this does not work either during linking:

find_package(Matplot++) # correctly found
target_link_libraries(my_target PUBLIC matplot )

will complain during linking that it can't find matplot.lib, I am not sure why...:

80>LINK : fatal error LNK1104: impossible d'ouvrir le fichier 'matplot.lib' # visual output
x86_64-w64-mingw32/bin/ld.exe: cannot find -lmatplot # mingw output

Platform

  • cross-platform issue - linux
  • [ x] cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: Windows 10
  • OS Version:
  • Compiler: Visual Studio 2017 win64
  • Compiler version:

Additional context

When installing (shared_lib=ON), matplot.lib was copied to the install path, but not nodesoup.lib.
Copying it from source\3rd_party\Release did not solve the problem.

cimg_library linking errors on OSX

When compiling on OSX I see several linking errors as below:

[  6%] Linking CXX executable example_plot_12
Undefined symbols for architecture x86_64:
  "_XRRFreeScreenConfigInfo", referenced from:
      cimg_library::CImgDisplay::_desinit_fullscreen() in libmatplot.a(common.cpp.o)
      cimg_library::CImgDisplay::_init_fullscreen() in libmatplot.a(common.cpp.o)
  "_XRRGetScreenInfo", referenced from:
      cimg_library::CImgDisplay::_desinit_fullscreen() in libmatplot.a(common.cpp.o)
      cimg_library::CImgDisplay::_init_fullscreen() in libmatplot.a(common.cpp.o)
  "_XRRQueryExtension", referenced from:
      cimg_library::CImgDisplay::_init_fullscreen() in libmatplot.a(common.cpp.o)
  "_XRRRotations", referenced from:
      cimg_library::CImgDisplay::_init_fullscreen() in libmatplot.a(common.cpp.o)
  "_XRRSetScreenConfig", referenced from:
      cimg_library::CImgDisplay::_desinit_fullscreen() in libmatplot.a(common.cpp.o)
      cimg_library::CImgDisplay::_init_fullscreen() in libmatplot.a(common.cpp.o)
  "_XRRSizes", referenced from:
      cimg_library::CImgDisplay::_init_fullscreen() in libmatplot.a(common.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [examples/line_plot/plot/example_plot_12] Error 1
make[1]: *** [examples/line_plot/plot/CMakeFiles/example_plot_12.dir/all] Error 2
make: *** [all] Error 2

I get this when compiling matplotplusplus standalone or when linking it to a test program using cmake as in the examples. Any thoughts or ideas?

fatal: invalid reference: v

fatal: invalid reference: v
CMake Error at matplotplusplus-subbuild/matplotplusplus-populate-prefix/tmp/matplotplusplus-populate-gitclone.cmake:40 (message):
Failed to checkout tag: 'v'

I'd need help to build with CPM

CPMAddPackage(
        NAME matplotplusplus
        GITHUB_REPOSITORY alandefreitas/matplotplusplus
)
# ...
target_link_libraries(CFD PUBLIC matplot)

Additional context

Gnuplot window stays in background

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • [x ] bug - logic error

Describe the bug
I wrote the simplest program with matplot++. It compiles, launches, but the windows stays behind.
The only way to get it in front was complicated (select the window in the taskbar with the mouse, press Alt, press Space, go down the menu and select Maximize). The plot is drawn correctly. Hovering over the taskbar gnuplot icon does not display the plot.

On linux, I do not have this problem. Nor or Windows gnuplot, which displays the plot correctly.

Steps to Reproduce

int main(int argc, char **argv) {
    using namespace matplot;
    std::vector<double> x = linspace(0, 2 * pi);
    std::vector<double> y = transform(x, [](auto x) { return sin(x); });
    plot(x, y, "-o");
    show();
    return 0;
}

Platform

  • cross-platform issue - linux
  • [x ] cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: Windows 10
  • OS Version:
  • Compiler: msys2/mingw
  • Compiler version:

Additional context

NB: the matplot installation did not work perfectly, as I had to manually copy the libmatplot.dll into the installation directory.

Thank you for your help.

Accessing internals of FILE is not portable

Accessing internals of FILE is not portable. Maybe use BUFSIZ instead?

Offending line:

size_t pipe_capacity = (pipe_->_bf._base != nullptr) ? pipe_->_bf._size : pipe_capacity_worst_case;

  • Ubuntu 20.04
  • CMake 3.18.2
  • Ninja 1.10.0
  • GCC 9.3.0
  • libc 2.31
  • libstdc++ 6.0.28
[2/1109] Building CXX object source/matplot/CMakeFiles/matplot.dir/Debug/backend/gnuplot.cpp.o
FAILED: source/matplot/CMakeFiles/matplot.dir/Debug/backend/gnuplot.cpp.o 
/bin/g++-9 -DMATPLOT_BUILD_HIGH_RESOLUTION_WORLD_MAP -Dcimg_display=1 -Dcimg_use_blas -Dcimg_use_fftw3 -Dcimg_use_jpeg -Dcimg_use_magick -Dcimg_use_openexr -Dcimg_use_png -Dcimg_use_tiff -Dcimg_use_xrandr -Dcimg_use_xshm -Dcimg_use_zlib -DCMAKE_INTDIR=\"Debug\" -I../source -I_deps/nodesoup-src/include -I_deps/cimg-src -I/usr/include/OpenEXR -I/usr/include/x86_64-linux-gnu/ImageMagick-6 -I/usr/include/ImageMagick-6 -fpermissive -g -std=gnu++17 -MD -MT source/matplot/CMakeFiles/matplot.dir/Debug/backend/gnuplot.cpp.o -MF source/matplot/CMakeFiles/matplot.dir/Debug/backend/gnuplot.cpp.o.d -o source/matplot/CMakeFiles/matplot.dir/Debug/backend/gnuplot.cpp.o -c ../source/matplot/backend/gnuplot.cpp
../source/matplot/backend/gnuplot.cpp: In member function ‘virtual void matplot::backend::gnuplot::run_command(const string&)’:
../source/matplot/backend/gnuplot.cpp:223:40: error: ‘FILE’ {aka ‘struct _IO_FILE’} has no member named ‘_bf’
  223 |         size_t pipe_capacity = (pipe_->_bf._base != nullptr) ? pipe_->_bf._size : pipe_capacity_worst_case;
      |                                        ^~~
../source/matplot/backend/gnuplot.cpp:223:71: error: ‘FILE’ {aka ‘struct _IO_FILE’} has no member named ‘_bf’
  223 |         size_t pipe_capacity = (pipe_->_bf._base != nullptr) ? pipe_->_bf._size : pipe_capacity_worst_case;
      |                                                                       ^~~

Suggestion: adopt ClangFormat for all files

Dear Alan,

thank you for sharing this awesome project.

I would like to suggest adopting ClangFormat, and use one of its styles for the whole code base.
This would make contributing much easier.
I think now, just after the release, would be a good time to do that, before more people start contributing which I am sure they will :)

I am aware that this would mean kind of a blocker in the Git history, but I am certain it will pay off long-term.

Cheers

gnuplot flashing for some examples

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug
Hello,

First thanks for the initiative, a good Data Visualization tool in C++ as intuitive as Matlab has been missing for a long time.

Regarding the bugs I encountered, a lot of examples are not working for me (plot, mesh, surf, geobullble,...) but some are (example_area_*.exe). By not working I mean, the gnuplot.exe flash the initial figure window without the plot and then disappear but I still see it is running in the task bar. I am unable to see the actual window on screen and if I hover my mouse on the taskbar icon I see an empty figure as preview
Untitled
.

There are no error messages in the console. I tested all the demos of gnuplot (5.2.8) and they work fine, the path is added to my environment variables.

Build: x64 (any of Release, Debug, MinSizeRel, ReWithDebInfo)

Do you have an idea what I am doing wrong ?

Thanks,
Marc

Steps to Reproduce

# Your steps go here
mkdir build
cd build
cmake .. <options> -DCMAKE_BUILD_TYPE=Release

Output

# Press ENTER to continue...

Platform

  • cross-platform issue - linux
  • cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: Windows 10 Home
  • OS Version: 10.0.18363 Build 18363
  • Compiler: MVSC
  • Compiler version: 19.27.29111

Additional context

Simple project doesn't link and examples don't build.

I followed the instructions at https://github.com/alandefreitas/matplotplusplus#build-from-source on Ubuntu 18.04.5 with gcc-10.1.0 for source build. The installation was successful, but when building a test project I'm getting missing linker dependencies:

[build] : && /usr/bin/g++-10 -O3 -DNDEBUG  CMakeFiles/o3d.dir/main.cpp.o -o o3d  -lmatplot && :
[build] //usr/local/lib/libmatplot.a(common.cpp.o): In function `cimg_library::CImg<unsigned char>::_save_png(_IO_FILE*, char const*, unsigned int) const [clone .isra.0]':
[build] common.cpp:(.text+0x79c4): undefined reference to `png_create_write_struct'

Here is my CMakeLists.txt:

cmake_minimum_required(VERSION 3.18)
project(o3d VERSION 0.1.0)
add_executable(o3d main.cpp)
find_package(Matplot++ REQUIRED)
target_link_libraries(o3d matplot)

I tried to build the examples and build/examples was not created:

paul@extra:~/matplotplusplus/build$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-O2"
CMAKE_MODULE_PATH=/home/paul/matplotplusplus/cmake
CMAKE_INSTALL_PREFIX=/usr/local
CMAKE_INSTALL_LIBDIR=lib
-- Configuring done
-- Generating done
-- Build files have been written to: /home/paul/matplotplusplus/build
paul@extra:~/matplotplusplus/build$ cmake --build . --parallel 2 --config Release
[ 13%] Built target nodesoup
[100%] Built target matplot
paul@extra:~/matplotplusplus/build$ ls
CMakeCache.txt  cmake_install.cmake  CPackSourceConfig.cmake  Makefile                Matplot++ConfigVersion.cmake
CMakeFiles      CPackConfig.cmake    install_manifest.txt     matplot++-config.cmake  source

undefined variable warning when using legend

Bug category

  • bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug
I tried to use legend as shown in here:
https://github.com/alandefreitas/matplotplusplus/blob/master/examples/appearance/labels/legend/legend_5.cpp
But in runtime, I receive a warning stating line 3078: undefined variable: keyentry and the plot is unable to render.
I'm using Ubuntu 18.04 and gnuplot 5.2 patchlevel 2 backend.

Steps to Reproduce

My exact code:

auto y1Plot = matplot::plot(x, y1);
matplot::legend({y1Plot}, {"KDE 1"});
matplot::show();

Where x and y1 are of type std::vector<double>.

Environment Details:

  • OS: Ubuntu
  • OS Version: 18.04
  • Compiler: GCC
  • Compiler version: 8.4.0

Compiling Error: error: reference to ‘wait’ is ambiguous

andres6936@Tierra ~/CLionProjects/matplotplusplus/cmake-build-debug $ uname -a
Linux Tierra 4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019 x86_64 GNU/Linux
andres6936@Tierra ~/CLionProjects/matplotplusplus/cmake-build-debug $ cmake --version
cmake version 3.16.0
andres6936@Tierra ~/CLionProjects/matplotplusplus/cmake-build-debug $ gcc --version
gcc (Ubuntu 9.3.0-10ubuntu2~16.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.

The following is CMake terminal output.

Execution of CMake Command ..
andres6936@Tierra ~/CLionProjects/matplotplusplus/cmake-build-debug $ cmake ..
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMAKE_MODULE_PATH=/home/andres6936/CLionProjects/matplotplusplus/cmake
-- CPM: adding package [email protected] (4bcd8cd2d6c963ccf053f8c19dbb63c065467527)
-- CPM: adding package [email protected] (v.221)
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (found version "80") 
JPEG Found
-- Found TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (found version "4.0.6") 
TIFF Found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") 
ZLIB Found
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.2.54") 
PNG Found
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Could NOT find BLAS (missing: BLAS_LIBRARIES) 
-- LAPACK requires BLAS
-- A library with LAPACK API not found. Please specify library location.
-- Could NOT find BLAS (missing: BLAS_LIBRARIES) 
-- Could NOT find FFTW (missing: FFTW_INCLUDE_DIRS) 
-- Checking for module 'OpenEXR'
--   No package 'OpenEXR' found
-- Checking for module 'Magick++'
--   No package 'Magick++' found
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Looking for C++ include filesystem
-- Looking for C++ include filesystem - found
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED - Success
-- Looking for __fbufsize
-- Looking for __fbufsize - found
-- Looking for min
-- Looking for min - not found
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so   
ERROR: EXTERNAL LIBRARY 'GLAD' NOT FOUND
-- Found GLFW3: /usr/local/lib/libglfw3.a  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/andres6936/CLionProjects/matplotplusplus/cmake-build-debug
andres6936@Tierra ~/CLionProjects/matplotplusplus/cmake-build-debug $ make -j2
Scanning dependencies of target generate_examples
Scanning dependencies of target nodesoup
[  1%] Linking CXX static library libnodesoup.a
[  1%] Linking CXX executable generate_examples
[  4%] Linking CXX static library libmatplot.a
Scanning dependencies of target example_plot_12
Scanning dependencies of target example_plot_2
[  4%] Building CXX object examples/line_plot/plot/CMakeFiles/example_plot_12.dir/plot_12.cpp.o
[  4%] Building CXX object examples/line_plot/plot/CMakeFiles/example_plot_2.dir/plot_2.cpp.o
/home/andres6936/CLionProjects/matplotplusplus/examples/line_plot/plot/plot_2.cpp: In function ‘int main()’:
/home/andres6936/CLionProjects/matplotplusplus/examples/line_plot/plot/plot_2.cpp:11:5: error: reference to ‘wait’ is ambiguous
   11 |     wait();
      |     ^~~~
In file included from /usr/include/stdlib.h:42,
                 from /usr/include/c++/9/cstdlib:75,
                 from /usr/include/c++/9/bits/stl_algo.h:59,
                 from /usr/include/c++/9/algorithm:62,
                 from /home/andres6936/CLionProjects/matplotplusplus/source/matplot/util/common.h:8,
                 from /home/andres6936/CLionProjects/matplotplusplus/source/matplot/matplot.h:9,
                 from /home/andres6936/CLionProjects/matplotplusplus/examples/line_plot/plot/plot_2.cpp:1:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:66:7: note: candidates are: ‘union wait’
   66 | union wait
      |       ^~~~
In file included from /home/andres6936/CLionProjects/matplotplusplus/source/matplot/matplot.h:9,
                 from /home/andres6936/CLionProjects/matplotplusplus/examples/line_plot/plot/plot_2.cpp:1:
/home/andres6936/CLionProjects/matplotplusplus/source/matplot/util/common.h:125:10: note:                 ‘void matplot::wait()’
  125 |     void wait();
      |          ^~~~
/home/andres6936/CLionProjects/matplotplusplus/examples/line_plot/plot/plot_12.cpp: In function ‘int main()’:
/home/andres6936/CLionProjects/matplotplusplus/examples/line_plot/plot/plot_12.cpp:10:5: error: reference to ‘wait’ is ambiguous
   10 |     wait();
      |     ^~~~
In file included from /usr/include/stdlib.h:42,
                 from /usr/include/c++/9/bits/std_abs.h:38,
                 from /usr/include/c++/9/cmath:47,
                 from /home/andres6936/CLionProjects/matplotplusplus/examples/line_plot/plot/plot_12.cpp:1:
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:66:7: note: candidates are: ‘union wait’
   66 | union wait
      |       ^~~~
In file included from /home/andres6936/CLionProjects/matplotplusplus/source/matplot/matplot.h:9,
                 from /home/andres6936/CLionProjects/matplotplusplus/examples/line_plot/plot/plot_12.cpp:2:
/home/andres6936/CLionProjects/matplotplusplus/source/matplot/util/common.h:125:10: note:                 ‘void matplot::wait()’
  125 |     void wait();
      |          ^~~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.