23#define USE_CXX (__cplusplus >= 201103)
28#include <boost/make_shared.hpp>
30#include "gnuplot-iostream.h"
36 gp <<
"set palette rgb 3,2,2;";
38 gp << gp.file1d(x) <<
"matrix with image";
42void plot(
const arma::cx_mat & x, std::string title){
43 arma::mat y = arma::abs(x);
47 (*current_figure) <<
"plot ";
49 (*current_figure) <<
current_figure->file1d(y) <<
"title \'" << title <<
"\' with lines ";
50 (*current_figure) << std::endl;
53void replot(
const arma::cx_mat & x, std::string title){
54 arma::mat y = arma::abs(x);
58 (*current_figure) <<
"replot ";
59 (*current_figure) <<
current_figure->file1d(y) <<
"title \'" << title <<
"\' with lines ";
60 (*current_figure) << std::endl;
64void plot(
const std::vector<T> & x){
65 arma::cx_mat y = arma::conv_to<arma::cx_mat>::from(x);
70void plot(
const std::vector<T> & x, std::string title){
71 arma::cx_mat y = arma::conv_to<arma::cx_mat>::from(x);
76void replot(
const std::vector<T> & x, std::string title){
77 arma::cx_mat y = arma::conv_to<arma::cx_mat>::from(x);
void imagesc(const arma::mat &x)
Definition plotting.h:34
std::shared_ptr< Gnuplot > current_figure
Definition plotting.h:32
void replot(const arma::cx_mat &x, std::string title)
Definition plotting.h:53
void plot(const arma::cx_mat &x, std::string title)
Definition plotting.h:42