Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::Gnuplot Class Reference

#include <Gnuplot.h>

Collaboration diagram for PLearn::Gnuplot:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Gnuplot (int max_nb_plot=20)
 Gnuplot (const Vec &v1, const string &opt1)
 Gnuplot (const Vec &v1, const string &opt1, const Vec &v2, const string &opt2)
 Gnuplot (const Vec &v1, const string &opt1, const Vec &v2, const string &opt2, const Vec &v3, const string &opt3)
 ~Gnuplot ()
PStream & operator<< (const string &str)
void flush ()
void setxrange (real xmin, real xmax)
void setyrange (real ymin, real ymax)
void setrange (real xmin, real xmax, real ymin, real ymax)
void seteps (const string &filename)
 set to eps mode, will save to specified .eps file

void plot (const Vec &v1, const string &opt1="")
void plot (const Vec &v1, const string &opt1, const Vec &v2, const string &opt2)
void plot (const Vec &v1, const Vec &v2)
void plot (const Vec &v1, const string &opt1, const Vec &v2, const string &opt2, const Vec &v3, const string &opt3)
void plot (const Vec &v1, const Vec &v2, const Vec &v3)
void plot (const Vec &v1, const string &opt1, const Vec &v2, const string &opt2, const Vec &v3, const string &opt3, const Vec &v4, const string &opt4)
void plot (const Vec &v1, const Vec &v2, const Vec &v3, const Vec &v4)
void plot (const Mat &m1, const string &opt1="")
void plot (const Mat &m1, const string &opt1, const Mat &m2, const string &opt2)
void plot (const Mat &m1, const string &opt1, const Mat &m2, const string &opt2, const Mat &m3, const string &opt3)
void plot (const Mat &m1, const string &opt1, const Mat &m2, const string &opt2, const Mat &m3, const string &opt3, const Mat &m4, const string &opt4)
void plot (const Mat &m1, const string &opt1, const Mat &m2, const string &opt2, const Mat &m3, const string &opt3, const Mat &m4, const string &opt4, const Mat &m5, const string &opt5)
void plot (const Mat &m1, const string &opt1, const Mat &m2, const string &opt2, const Mat &m3, const string &opt3, const Mat &m4, const string &opt4, const Mat &m5, const string &opt5, const Mat &m6, const string &opt6)
void plotClasses (const Mat &m)
void multiplot (vector< Mat * > &ms, vector< string > &opts)
void plot3d (const Mat &m1, const string &opt1="")
void plotcdf (Vec feature, const string &title="cdf")
void plotcdf (const Array< Vec > &vecarray, const Array< string > &titlearray)
void plotdensity (Vec feature, const string &title, int halfwindowsize, string range="")
void plotdensity (const Array< Vec > &vecarray, const Array< string > &titlearray, int halfwindowsize)
void histoplot (Vec feature, real minval, real maxval, int nbins, bool do_normalize=false, char *title="histogram")
void histoplot (Vec feature, Vec classnums, real minval, real maxval, int nbins, bool do_normalize=false)
void featureplot (Mat inputs, Vec classnums, char *withwhat="points")
void featureplot (Mat dataset, char *withwhat="points")
void export_ps (string psfname, string psoptions="eps color")

Protected Attributes

TmpFilenames tmpfilenames
FILE * gp_cstream
PStream tognuplot

Constructor & Destructor Documentation

PLearn::Gnuplot::Gnuplot (  int  max_nb_plot = 20  ) 
 

Definition at line 63 of file Gnuplot.cc.

References PLearn::PStream::attach(), PLearn::endl(), gp_cstream, PLearn::PStream::outmode, and tognuplot.

PLearn::Gnuplot::Gnuplot (  const Vec &  v1,
const string &  opt1
) 
 

Definition at line 72 of file Gnuplot.cc.

References PLearn::PStream::attach(), PLearn::endl(), gp_cstream, PLearn::PStream::outmode, plot(), tognuplot, and PLearn::Vec.

PLearn::Gnuplot::Gnuplot (  const Vec &  v1,
const string &  opt1,
const Vec &  v2,
const string &  opt2
) 
 

Definition at line 82 of file Gnuplot.cc.

References PLearn::PStream::attach(), PLearn::endl(), gp_cstream, PLearn::PStream::outmode, plot(), and tognuplot.

PLearn::Gnuplot::Gnuplot (  const Vec &  v1,
const string &  opt1,
const Vec &  v2,
const string &  opt2,
const Vec &  v3,
const string &  opt3
) 
 

Definition at line 92 of file Gnuplot.cc.

References PLearn::PStream::attach(), PLearn::endl(), gp_cstream, PLearn::PStream::outmode, plot(), and tognuplot.

PLearn::Gnuplot::~Gnuplot (   ) 
 

Definition at line 103 of file Gnuplot.cc.

References PLearn::endl(), gp_cstream, and tognuplot.


Member Function Documentation

void PLearn::Gnuplot::export_ps (  string  psfname,
string  psoptions = "eps color"
) 
 

Definition at line 462 of file Gnuplot.cc.

References PLearn::endl(), and tognuplot.

void PLearn::Gnuplot::featureplot (  Mat  dataset,
char *  withwhat = "points"
)  [inline]
 

Definition at line 124 of file Gnuplot.h.

References PLearn::TMat< T >::lastColumn(), PLearn::TMat< T >::subMatColumns(), and PLearn::TMat< T >::width().

void PLearn::Gnuplot::featureplot (  Mat  inputs,
Vec  classnums,
char *  withwhat = "points"
) 
 

Plots each input feature (column of inputs), with the different values it takes in the dataset and with a different color for each class

Definition at line 361 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::TMat< T >::length(), PLearn::max(), tmpfilenames, tognuplot, and PLearn::TMat< T >::width().

void PLearn::Gnuplot::flush (   ) 
 

Definition at line 115 of file Gnuplot.cc.

References PLearn::PStream::flush(), and tognuplot.

void PLearn::Gnuplot::histoplot (  Vec  feature,
Vec  classnums,
real  minval,
real  maxval,
int  nbins,
bool  do_normalize = false
) 
 

Definition at line 326 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::TVec< T >::length(), PLearn::max(), PLearn::normalize(), tmpfilenames, tognuplot, and val.

void PLearn::Gnuplot::histoplot (  Vec  feature,
real  minval,
real  maxval,
int  nbins,
bool  do_normalize = false,
char *  title = "histogram"
) 
 

Definition at line 310 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::histogram(), PLearn::normalize(), tmpfilenames, and tognuplot.

void PLearn::Gnuplot::multiplot (  vector< Mat * > &  ms,
vector< string > &  opts
) 
 

Definition at line 290 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::saveGnuplot(), tmpfilenames, and tognuplot.

PStream & PLearn::Gnuplot::operator<< (  const string &  str  ) 
 

Definition at line 109 of file Gnuplot.cc.

References tognuplot.

void PLearn::Gnuplot::plot (  const Mat &  m1,
const string &  opt1,
const Mat &  m2,
const string &  opt2,
const Mat &  m3,
const string &  opt3,
const Mat &  m4,
const string &  opt4,
const Mat &  m5,
const string &  opt5,
const Mat &  m6,
const string &  opt6
) 
 

Definition at line 235 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::saveGnuplot(), tmpfilenames, and tognuplot.

void PLearn::Gnuplot::plot (  const Mat &  m1,
const string &  opt1,
const Mat &  m2,
const string &  opt2,
const Mat &  m3,
const string &  opt3,
const Mat &  m4,
const string &  opt4,
const Mat &  m5,
const string &  opt5
) 
 

Definition at line 220 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::saveGnuplot(), tmpfilenames, and tognuplot.

void PLearn::Gnuplot::plot (  const Mat &  m1,
const string &  opt1,
const Mat &  m2,
const string &  opt2,
const Mat &  m3,
const string &  opt3,
const Mat &  m4,
const string &  opt4
) 
 

Definition at line 208 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::saveGnuplot(), tmpfilenames, and tognuplot.

void PLearn::Gnuplot::plot (  const Mat &  m1,
const string &  opt1,
const Mat &  m2,
const string &  opt2,
const Mat &  m3,
const string &  opt3
) 
 

Definition at line 188 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::saveGnuplot(), tmpfilenames, and tognuplot.

void PLearn::Gnuplot::plot (  const Mat &  m1,
const string &  opt1,
const Mat &  m2,
const string &  opt2
) 
 

Definition at line 200 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::saveGnuplot(), tmpfilenames, and tognuplot.

void PLearn::Gnuplot::plot (  const Mat &  m1,
const string &  opt1 = ""
) 
 

Definition at line 181 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::Mat, PLearn::saveGnuplot(), tmpfilenames, and tognuplot.

void PLearn::Gnuplot::plot (  const Vec &  v1,
const Vec &  v2,
const Vec &  v3,
const Vec &  v4
)  [inline]
 

Definition at line 92 of file Gnuplot.h.

void PLearn::Gnuplot::plot (  const Vec &  v1,
const string &  opt1,
const Vec &  v2,
const string &  opt2,
const Vec &  v3,
const string &  opt3,
const Vec &  v4,
const string &  opt4
) 
 

Definition at line 165 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::saveGnuplot(), tmpfilenames, and tognuplot.

void PLearn::Gnuplot::plot (  const Vec &  v1,
const Vec &  v2,
const Vec &  v3
)  [inline]
 

Definition at line 90 of file Gnuplot.h.

void PLearn::Gnuplot::plot (  const Vec &  v1,
const string &  opt1,
const Vec &  v2,
const string &  opt2,
const Vec &  v3,
const string &  opt3
) 
 

Definition at line 152 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::saveGnuplot(), tmpfilenames, and tognuplot.

void PLearn::Gnuplot::plot (  const Vec &  v1,
const Vec &  v2
)  [inline]
 

Definition at line 88 of file Gnuplot.h.

void PLearn::Gnuplot::plot (  const Vec &  v1,
const string &  opt1,
const Vec &  v2,
const string &  opt2
) 
 

Definition at line 143 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::saveGnuplot(), tmpfilenames, and tognuplot.

void PLearn::Gnuplot::plot (  const Vec &  v1,
const string &  opt1 = ""
) 
 

Definition at line 136 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::saveGnuplot(), tmpfilenames, and tognuplot.

Referenced by PLearn::displayHistogram(), Gnuplot(), and PLearn::interactiveDisplayCDF().

void PLearn::Gnuplot::plot3d (  const Mat &  m1,
const string &  opt1 = ""
) 
 

Definition at line 301 of file Gnuplot.cc.

References c_str(), PLearn::endl(), PLearn::saveGnuplot(), tmpfilenames, and tognuplot.

void PLearn::Gnuplot::plotcdf (  const Array< Vec > &  vecarray,
const Array< string > &  titlearray
) 
 

Definition at line 395 of file Gnuplot.cc.

References c_str(), PLearn::TVec< T >::copy(), PLearn::endl(), PLearn::TVec< T >::length(), PLearn::TVec< T >::size(), PLearn::sortElements(), tmpfilenames, and tognuplot.

void PLearn::Gnuplot::plotcdf (  Vec  feature,
const string &  title = "cdf"
) 
 

Definition at line 383 of file Gnuplot.cc.

References c_str(), PLearn::TVec< T >::copy(), PLearn::endl(), PLearn::TVec< T >::length(), PLearn::sortElements(), tmpfilenames, and tognuplot.

void PLearn::Gnuplot::plotClasses (  const Mat &  m  ) 
 

Definition at line 253 of file Gnuplot.cc.

References PLearn::TMat< T >::copy(), PLearn::endl(), fname, PLearn::TMat< T >::length(), PLERROR, PLearn::sortRows(), tmpfilenames, tognuplot, PLearn::tostring(), and x.

void PLearn::Gnuplot::plotdensity (  const Array< Vec > &  vecarray,
const Array< string > &  titlearray,
int  halfwindowsize
) 
 

Definition at line 434 of file Gnuplot.cc.

References c_str(), PLearn::TVec< T >::copy(), PLearn::endl(), PLearn::TVec< T >::length(), PLearn::TVec< T >::size(), PLearn::sortElements(), tmpfilenames, tognuplot, and x.

void PLearn::Gnuplot::plotdensity (  Vec  feature,
const string &  title,
int  halfwindowsize,
string  range = ""
) 
 

Definition at line 414 of file Gnuplot.cc.

References c_str(), PLearn::TVec< T >::copy(), PLearn::endl(), PLearn::TVec< T >::length(), PLERROR, PLearn::sortElements(), tmpfilenames, tognuplot, and x.

void PLearn::Gnuplot::seteps (  const string &  filename  ) 
 

set to eps mode, will save to specified .eps file

Definition at line 130 of file Gnuplot.cc.

References PLearn::endl(), and tognuplot.

void PLearn::Gnuplot::setrange (  real  xmin,
real  xmax,
real  ymin,
real  ymax
) 
 

Definition at line 124 of file Gnuplot.cc.

References setxrange(), and setyrange().

void PLearn::Gnuplot::setxrange (  real  xmin,
real  xmax
) 
 

Definition at line 118 of file Gnuplot.cc.

References PLearn::endl(), and tognuplot.

Referenced by setrange().

void PLearn::Gnuplot::setyrange (  real  ymin,
real  ymax
) 
 

Definition at line 121 of file Gnuplot.cc.

References PLearn::endl(), and tognuplot.

Referenced by setrange().


Member Data Documentation

FILE* PLearn::Gnuplot::gp_cstream [protected]
 

Definition at line 67 of file Gnuplot.h.

Referenced by Gnuplot(), and ~Gnuplot().

TmpFilenames PLearn::Gnuplot::tmpfilenames [protected]
 

Definition at line 66 of file Gnuplot.h.

Referenced by featureplot(), histoplot(), multiplot(), plot(), plot3d(), plotcdf(), plotClasses(), and plotdensity().

PStream PLearn::Gnuplot::tognuplot [protected]
 

Definition at line 68 of file Gnuplot.h.

Referenced by export_ps(), featureplot(), flush(), Gnuplot(), histoplot(), multiplot(), operator<<(), plot(), plot3d(), plotcdf(), plotClasses(), plotdensity(), seteps(), setxrange(), setyrange(), and ~Gnuplot().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:23:06 2004 for PLearn by doxygen 1.3.7