Skip to content
Snippets Groups Projects
dualplot.h 2.19 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                                    *//
    //***************************************************************************//
    
    //! \file  dualplot.h
    //! \brief collection NPlot of plot frames CPlot
    
    #include "axis.h"
    
    Wuttke, Joachim's avatar
    ..  
    Wuttke, Joachim committed
    //! One plot window.
    
    
    class CPlot {
    
    Wuttke, Joachim's avatar
    ..  
    Wuttke, Joachim committed
        uint iPlot;             ///< The index of this window in NPloWin::Plots.
    
    Wuttke, Joachim's avatar
    ..  
    Wuttke, Joachim committed
        // For data plotting:
    
        bool with_errors;
    
    Wuttke, Joachim's avatar
    ..  
    Wuttke, Joachim committed
        // For curve plotting:
    
        uint equipoints;
        bool refine;
    
        CPlot( uint _iPlot, bool _logx, bool _logy );
    
    
    Wuttke, Joachim's avatar
    Wuttke, Joachim committed
        void gp_write( string );
    
        void clearFrame();
    
        void plotFrame( string xlabel, 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,
                      string xco, string yco, string info );
    
        void showSpecs();
    
        void docTxLine( const string& line );
        void docPtTxLine( const string& line, uint num );
        void docCvTxLine( const string& line, uint num );
    
        void writePostscript( string ps_outdir, string ps_head, string ps_dict );
    
        void setAux( string cmd );
    
        string info() const;
    
        int gp_fifo;
        int gp_fno;
        string gp_fnames;
    
        uint ps_fnum; // file
    
        uint ps_snum; // spectrum
        uint ps_pnum; // spectrum with pstyle
        uint 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 uint nPlot;           ///< Must be kept equal to Plots.size().
        extern uint iPlot;           ///< Index of currently active plot window.
    
    
        void initialize();
    };