Home | Develop | Download | Contact
FuncOctavePlot.hpp
1/*
2 * FuncOctavePlot.hpp
3 *
4 * Copyright 2018 Fernando Pujaico Rivera <fernando.pujaico.rivera@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 *
21 */
22
30#ifndef __PDS_FUNCOCTAVEPLOT_HPP__
31#define __PDS_FUNCOCTAVEPLOT_HPP__
32
33#include <Pds/Ra>
34#include <vector>
35
45namespace Pds{
46
51namespace Octave{
52
53
61 extern std::string Cmd;
62
70 extern bool Cwd;
71
79 extern std::string Colormap;
80
88 extern unsigned int FontSize;
89
97 extern unsigned int LineWidth;
98
106 extern unsigned int MarkerSize;
107
115 extern bool DAspect;
116
124 extern bool XLimits;
125
133 extern bool YLimits;
134
142 extern bool ZLimits;
143
151 extern std::string Title;
152
160 extern std::string XLabel;
161
169 extern std::string YLabel;
170
178 extern std::string ZLabel;
179
187 extern std::vector<std::string> Legend;
188
197 int ExecuteFile(const std::string &octfilename);
198
203namespace Plot{
204
205
221 bool LogLogXY( const Pds::Vector &X,
222 const Pds::Vector &Y,
223 const std::string &octfilename,
224 const std::string &imgfilename);
225
238 bool LogLogXYXY(const Pds::Vector &X,
239 const Pds::Vector &Y,
240 const Pds::Vector &X2,
241 const Pds::Vector &Y2,
242 const std::string &octfilename,
243 const std::string &imgfilename);
244
245
257 bool Bar( const Pds::Vector &X,
258 const Pds::Vector &Y,
259 const std::string &octfilename,
260 const std::string &imgfilename);
261
273 bool CurveXY( const Pds::Vector &X,
274 const Pds::Vector &Y,
275 const std::string &octfilename,
276 const std::string &imgfilename,
277 bool EnableLine=false);
278
290 bool CurveXY( const std::vector<Pds::Vector> &X,
291 const std::vector<Pds::Vector> &Y,
292 const std::string &octfilename,
293 const std::string &imgfilename,
294 bool EnableLine=false);
295
309 bool CurveXYXY( const Pds::Vector &X,
310 const Pds::Vector &Y,
311 const Pds::Vector &Xs,
312 const Pds::Vector &Ys,
313 const std::string &octfilename,
314 const std::string &imgfilename,
315 bool EnableLine=false);
316
330 const Pds::Vector &Y,
331 const Pds::Matrix &Xs,
332 const Pds::Vector &Ys,
333 const std::string &octfilename,
334 const std::string &imgfilename);
356 bool PointsX2D( const Pds::Matrix &X,
357 const std::string &octfilename,
358 const std::string &imgfilename);
359
370 bool PointsX2D( const Pds::Matrix &X0,
371 const Pds::Matrix &X1,
372 const std::string &octfilename,
373 const std::string &imgfilename);
374
385 bool PointsX2DY(const Pds::Matrix &X,
386 const Pds::Vector &Y,
387 const std::string &octfilename,
388 const std::string &imgfilename);
389
390
391
403 bool PointsX2DYW( const Pds::Matrix &X,
404 const Pds::Vector &Y,
405 const Pds::Vector &W,
406 const std::string &octfilename,
407 const std::string &imgfilename);
408
431 const Pds::Vector &Y,
432 const std::string &octfilename,
433 const std::string &imgfilename);
434
435
448 bool ScatterX2DYP( const Pds::Matrix &X,
449 const Pds::Vector &Y,
450 const Pds::Vector &P,
451 const std::string &octfilename,
452 const std::string &imgfilename);
453
466 const Pds::Vector &Y,
467 const Pds::Vector &W,
468 const std::string &octfilename,
469 const std::string &imgfilename);
470
482 const Pds::Vector &Y,
483 const std::string &octfilename,
484 const std::string &imgfilename);
485
506 bool ConfMatrix(const Pds::Matrix &A,
507 const std::vector<int> Label,
508 const std::string &octfilename,
509 const std::string &imgfilename);
510
521 bool ConfMatrix(const Pds::Matrix &A,
522 const std::vector<std::string> Label,
523 const std::string &octfilename,
524 const std::string &imgfilename);
525
544 bool PColor( const Pds::Matrix &A,
545 const std::string &octfilename,
546 const std::string &imgfilename);
547
557 bool ImageSc( const Pds::Matrix &A,
558 const std::string &octfilename,
559 const std::string &imgfilename);
560
582 bool Surf( const Pds::Matrix &X,
583 const Pds::Matrix &Y,
584 const Pds::Matrix &Z,
585 const std::string &octfilename,
586 const std::string &imgfilename);
587
597 bool Surf( const Pds::Matrix &Z,
598 const std::string &octfilename,
599 const std::string &imgfilename);
600
601
613 bool SurfC( const Pds::Matrix &X,
614 const Pds::Matrix &Y,
615 const Pds::Matrix &Z,
616 const std::string &octfilename,
617 const std::string &imgfilename);
618
632 const Pds::Matrix &Y,
633 const Pds::Matrix &Z,
634 const Pds::Vector &P3,
635 const std::string &octfilename,
636 const std::string &imgfilename);
637
638
660 const Pds::Vector &Y,
661 const std::string &octfilename,
662 const std::string &imgfilename);
663
669} // namespace Plot
670
671} // namespace Octave
672
673} // namespace Pds
674
675
680#endif /* __PDS_FUNCOCTAVEPLOT_HPP__ */
La clase tipo Pds::Matrix . Esta clase genera una matriz de Nlin lineas y Ncol columnas....
Definition: Matrix.hpp:96
La clase tipo Pds::Vector . Esta clase genera una matriz de Nlin lineas y 1 columna....
Definition: Vector.hpp:80
bool LogLogXY(const Pds::Vector &X, const Pds::Vector &Y, const std::string &octfilename, const std::string &imgfilename)
Plot de X vs. Y.
bool PointsX2D(const Pds::Matrix &X, const std::string &octfilename, const std::string &imgfilename)
Plot de muestras en 2D en las columnas X.
std::string YLabel
Texto correspondente a ylabel. Exemplo:
int ExecuteFile(const std::string &octfilename)
Ejecuta un archivo de texto. Exemplo:
bool SurfC(const Pds::Matrix &X, const Pds::Matrix &Y, const Pds::Matrix &Z, const std::string &octfilename, const std::string &imgfilename)
Plot la matriz usando surfc.
bool Bar(const Pds::Vector &X, const Pds::Vector &Y, const std::string &octfilename, const std::string &imgfilename)
Plot bar X vs. Y.
std::string Title
Texto correspondente al título. Exemplo:
bool CurveX2DYX2DY(const Pds::Matrix &X, const Pds::Vector &Y, const Pds::Matrix &Xs, const Pds::Vector &Ys, const std::string &octfilename, const std::string &imgfilename)
Plot de X vs. Y junto con Xs vs. Ys. Donde X y Xs tienen 2 dimensiones.
bool YLimits
Habilita o deshabilita ylim(...) en el código octave. Por defecto:
bool Cwd
Indica si se habilitará o no ejecutar octave en current working directory. Por defecto:
bool PairwiseScatterXY(const Pds::Matrix &X, const Pds::Vector &Y, const std::string &octfilename, const std::string &imgfilename)
Plot a pair wise scatter3 de las columnas de X.
std::string Cmd
Comando que será usado para invocar a octave. Por defecto:
std::vector< std::string > Legend
Textos de la legenda legend(). Exemplo:
bool CurveXYXY(const Pds::Vector &X, const Pds::Vector &Y, const Pds::Vector &Xs, const Pds::Vector &Ys, const std::string &octfilename, const std::string &imgfilename, bool EnableLine=false)
Plot de X vs. Y junto con Xs vs. Ys.
bool LogLogXYXY(const Pds::Vector &X, const Pds::Vector &Y, const Pds::Vector &X2, const Pds::Vector &Y2, const std::string &octfilename, const std::string &imgfilename)
Plot de X vs. Y.
bool PColor(const Pds::Matrix &A, const std::string &octfilename, const std::string &imgfilename)
Plot la matriz usando pcolor.
bool SurfCWithPoint(const Pds::Matrix &X, const Pds::Matrix &Y, const Pds::Matrix &Z, const Pds::Vector &P3, const std::string &octfilename, const std::string &imgfilename)
Plot la matriz usando surfc y un punto usando scatter3.
bool ScatterX2DYW(const Pds::Matrix &X, const Pds::Vector &Y, const Pds::Vector &W, const std::string &octfilename, const std::string &imgfilename)
Plot de muestras en 2D en las columnas X, muestra los valores de Y con una degradación de colores.
bool ScatterX2DYP(const Pds::Matrix &X, const Pds::Vector &Y, const Pds::Vector &P, const std::string &octfilename, const std::string &imgfilename)
Plot de muestras en 2D en las columnas X, muestra los valores de Y con una degradación de colores.
unsigned int FontSize
Font size usado en el código octave. Por defecto:
std::string XLabel
Texto correspondente a xlabel. Exemplo:
bool ScatterX3DY(const Pds::Matrix &X, const Pds::Vector &Y, const std::string &octfilename, const std::string &imgfilename)
Plot de muestras en 3D en las columnas X, muestra los valores de Y con una degradación de colores.
bool CurveXY(const Pds::Vector &X, const Pds::Vector &Y, const std::string &octfilename, const std::string &imgfilename, bool EnableLine=false)
Plot de X vs. Y.
std::string Colormap
Corlormap usado en el código octave. Por defecto:
bool ScatterX2DY(const Pds::Matrix &X, const Pds::Vector &Y, const std::string &octfilename, const std::string &imgfilename)
Plot de muestras en 2D en las columnas X, muestra los valores de Y con una degradación de colores.
bool PointsX2DYW(const Pds::Matrix &X, const Pds::Vector &Y, const Pds::Vector &W, const std::string &octfilename, const std::string &imgfilename)
Plot de muestras en 2D en las columnas X, clasificadas de forma binaria con Y>=0.5,...
std::string ZLabel
Texto correspondente a zlabel. Exemplo:
bool ZLimits
Habilita o deshabilita zlim(...) en el código octave. Por defecto:
bool Surf(const Pds::Matrix &X, const Pds::Matrix &Y, const Pds::Matrix &Z, const std::string &octfilename, const std::string &imgfilename)
Plot la matriz usando surf.
bool DAspect
Habilita o deshabilita daspect([1 1 1]) en el código octave. Por defecto:
unsigned int LineWidth
Line width usado en el código octave. Por defecto:
bool ConfMatrix(const Pds::Matrix &A, const std::vector< int > Label, const std::string &octfilename, const std::string &imgfilename)
Plot de la matriz de confusion.
bool ImageSc(const Pds::Matrix &A, const std::string &octfilename, const std::string &imgfilename)
Plot la matriz usando imagesc.
bool XLimits
Habilita o deshabilita xlim(...) en el código octave. Por defecto:
bool PointsX2DY(const Pds::Matrix &X, const Pds::Vector &Y, const std::string &octfilename, const std::string &imgfilename)
Plot de muestras en 2D en las columnas X, clasificadas de forma binaria con Y>=0.5,...
unsigned int MarkerSize
Line width usado en el código octave. Por defecto:
Nombre de espacio para Pds (Procesamiento Digital de Senales)
Definition: AbstractRV.hpp:42

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed