All Projects → ethz-asl → plotty

ethz-asl / plotty

Licence: other
matplotlib-cpp with Eigen interfaces.

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to plotty

QGeoloGIS
Migrated to: https://gitlab.com/Oslandia/qgis/QGeoloGIS
Stars: ✭ 27 (-30.77%)
Mutual labels:  plot
PolyDraw
✳️ PTSource PolyDraw is a free 3D polygonal modeller for Windows x86 and x64, for creating or modifying 3D objects using a mesh of 3D points and parametric NURBS Curves .Exports and imports to over 40 formats including WebVR and 3D Printing.
Stars: ✭ 17 (-56.41%)
Mutual labels:  plot
smag
Show Me A Graph - Command Line Graphing
Stars: ✭ 78 (+100%)
Mutual labels:  plot
mkm-sdk
Python SDK for Magickartenmarkt API
Stars: ✭ 33 (-15.38%)
Mutual labels:  wow
dogify
wow very useful
Stars: ✭ 46 (+17.95%)
Mutual labels:  wow
hardhat-contract-sizer
Output Ethereum contract sizes with Hardhat 📐
Stars: ✭ 55 (+41.03%)
Mutual labels:  wow
lumo
A high performance WebGL tile rendering library
Stars: ✭ 58 (+48.72%)
Mutual labels:  plot
pgfplots
pgfplots - A TeX package to draw normal and/or logarithmic plots directly in TeX in two and three dimensions with a user-friendly interface and pgfplotstable - a TeX package to round and format numerical tables. Examples in manuals and/or on web site.
Stars: ✭ 119 (+205.13%)
Mutual labels:  plot
Swar-Chia-Plot-Manager
This is a Cross-Platform Plot Manager for Chia Plotting that is simple, easy-to-use, and reliable.
Stars: ✭ 1,310 (+3258.97%)
Mutual labels:  plot
hotpot.nvim
🍲 Carl Weathers #1 Neovim Plugin.
Stars: ✭ 183 (+369.23%)
Mutual labels:  fennel
chart4s
Draw a web chart by Scala
Stars: ✭ 36 (-7.69%)
Mutual labels:  plot
graphest
A faithful graphing calculator
Stars: ✭ 42 (+7.69%)
Mutual labels:  plot
region-plot
A tool to plot significant regions of GWAS
Stars: ✭ 20 (-48.72%)
Mutual labels:  plot
dots
The dotfiles for my linux system •••
Stars: ✭ 42 (+7.69%)
Mutual labels:  fennel
live-graph
Simple live graph with Flask and SocketIO
Stars: ✭ 17 (-56.41%)
Mutual labels:  plot
aya
Pocket sized programs
Stars: ✭ 39 (+0%)
Mutual labels:  plot
OpenPlot
一款开源的地理信息标绘组件
Stars: ✭ 19 (-51.28%)
Mutual labels:  plot
wow-classic-items
Collection of all WoW Classic and The Burning Crusade Classic items, professions, zones and classes
Stars: ✭ 29 (-25.64%)
Mutual labels:  wow
SwiftCharts
Easy to use and highly customizable charts library for iOS
Stars: ✭ 2,405 (+6066.67%)
Mutual labels:  plot
MarsAdmin
MarsAdmin v7 is a general interface add-on which will help staff member ingame for trinity core.
Stars: ✭ 13 (-66.67%)
Mutual labels:  wow

Plotty: C++ Interface to Matplotlib

image

Principles

  • plotty::plot(...) automatically creates a new figure
  • plotty::show() shows the results of the plot
  • calls to plotty::plot(...) go to the same plot until plotty::show() is called
  • by default, calls to plotty::show() are blocking and execution continues only after the plot window is closed

Simple plot of a vector:

// Std Vector:
std::vector<double> v({1, 2, 3, 4});
plotty::plot(v);
plotty::show();

// Eigen Types:
Eigen::VectorXd w(100);
w.setRandom();
plotty::plot(w)
plotty::show();

Plot x and y

Eigen::VectorXd t(100);
t.setLinSpaced(100, 0, 20);
Eigen::VectorXd v(100);
v.setRandom();
plotty::plot(t, v);
plotty::show();

Subplots

plotty::subplot(3, 1, 1);
plotty::plot(v1);
plotty::subplot(3, 1, 2);
plotty::plot(v2);
plotty::subplot(3, 1, 3);
plotty::plot(v2);
plotty::plot();

Histogram

The histogram function only exposes the bins, data and type parameters of matplotlibs histogram function.

plotty::hist(v, 10, "bar");
plotty::show();

Formatting

All functions accept optional format arguments (plotty::plot(x, y, format) or plotty::plot(y, format)). The expected format strings are equivalent to the matplotlib format strings:

plotty::plot(t, v, "rx"); // red x'es
plotty::show();

Multiple open Plots

plotty::show(false) opens a non-blocking window. You have to open a new figure to get a second plot ( plotty::figure()). The final figure should be opened in blocking mode to keep all windows open.

plotty::plot(v1);
plotty::show(false); // show non-blocking

...

plotty::figure(); // new figure
plotty::plot(v2)
plotty::show(false); // open non-blocking

...

plotty::figure();
plotty::plot(v3);
plotty::show(); // blocking to keep figures 1-3 open.

plotty::figure() accepts a string argument that labels / identifies a specific plot.

Style and Labels

plotty::plot(t, x);
plotty::xlabel("time [s]");
plotty::ylabel("Position [m]");
plotty::title("Position over time");
plotty::xlim(t_start, t_end);
plotty::ylim(0, x_max);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].