Skip to content
Snippets Groups Projects
dualplot.hpp 2.36 KiB
Newer Older
  • Learn to ignore specific revisions
  • Wuttke, Joachim's avatar
    ..  
    Wuttke, Joachim committed
    //***************************************************************************//
    
    //* FRIDA: fast reliable interactive data analysis                         *//
    
    Wuttke, Joachim's avatar
    ..  
    Wuttke, Joachim committed
    //* (C) Joachim Wuttke 1990-, v2(C++) 2001-                                 *//
    //* http://apps.jcns.fz-juelich.de/frida                                    *//
    //***************************************************************************//
    
    
    Wuttke, Joachim's avatar
    Wuttke, Joachim committed
    //! \file  dualplot.hpp
    
    Wuttke, Joachim's avatar
    ..  
    Wuttke, Joachim committed
    //! \brief collection NPlot of plot frames CPlot
    
    Wuttke, Joachim's avatar
    Wuttke, Joachim committed
    #include "axis.hpp"
    
    Wuttke, Joachim's avatar
    ..  
    Wuttke, Joachim committed
    //! One plot window.
    
    
    class CPlot {
    
        int iPlot;             ///< The index of this window in NPloWin::Plots.
    
    Wuttke, Joachim's avatar
    ..  
    Wuttke, Joachim committed
        // For data plotting:
    
        int maxpoints;
    
        bool with_errors;
    
    Wuttke, Joachim's avatar
    ..  
    Wuttke, Joachim committed
        // For curve plotting:
    
        int equipoints;
    
        CPlot( int _iPlot, bool _logx, bool _logy );
    
        void clearFrame();
    
        void plotFrame( const string& xlabel, const string& ylabel );
    
        void addSpec( bool as_line, bool new_style, int style_no,
    
                      const vector<double>& xp,
    
                      const vector<double>& yp,
                      const vector<double>& dyp,
    
                      const vector<double>& z,
    
                      const string& xco,
                      const string& yco,
                      const string& info );
    
        void showSpecs();
    
        void docTxLine( const string& line );
    
        void docPtTxLine( const string& line, int num );
        void docCvTxLine( const string& line, int num );
    
        void writePostscript( const string& ps_outdir,
                              const string& ps_head,
                              const string& ps_dict );
        void setAux( const string& cmd );
    
        string info() const;
    
        int gp_fifo;
        int gp_fno;
        string gp_fnames;
    
    
        int ps_fnum; // file
        int ps_snum; // spectrum
        int ps_pnum; // spectrum with pstyle
        int ps_cnum; // spectrum with cstyle
    
        void ps_ticktack( const vector<double>& Tacks, int ntpt,
                          const double *ticklim, const CAxis *A );
    
        vector<string> ps_Doc;
        vector<string> ps_accu; // future output is accumulated here
    
    Wuttke, Joachim's avatar
    ..  
    Wuttke, Joachim committed
    
    
    //! Direct access to plot windows collection.
    
    Wuttke, Joachim's avatar
    ..  
    Wuttke, Joachim committed
    
    
    namespace NPloWin {
    
    Wuttke, Joachim's avatar
    ..  
    Wuttke, Joachim committed
        extern vector<CPlot*> Plots; ///< This vector holds all plot windows.
    
        extern int nPlot;           ///< Must be kept equal to Plots.size().
        extern int iPlot;           ///< Index of currently active plot window.
    
    
        void initialize();