Skip to content
Snippets Groups Projects
dualplot.h 1.85 KiB
Newer Older
  • Learn to ignore specific revisions
  • class CAxis {
    
    Wuttke, Joachim's avatar
    Wuttke, Joachim committed
        double inf, sup;
    
        CCoord C;
        bool   logflag; // 'log' is reserved for math.h
        bool   force;
    
        CAxis( bool _log ) :
            logflag(_log), force(false) { setAuto(); };
    
        void Ask( string quest );
        void setLog( bool _log );
    
        double pc(double v) const;
    
        void setAuto();
    
        void setLimits( string axnam, double _inf, double _sup );
        void setRoundedLimits( string axnam, double _inf, double _sup );
        void set_from_string( string text );
    
        string str() const;
        string info() const;
    
    Wuttke, Joachim's avatar
    Wuttke, Joachim committed
        bool finite() const;
    
        bool contains( double val ) const;
    
        double value2plotcoord( double v ) const;
        double plotcoord2value( double c ) const;
    
        double inf_pos() const;
    
    #define CPLOT_PSMAX 10
    #define CPLOT_LINSIZ 80
    
    
    class CPlot {
    
     public:
        uint iPlot;
        CAxis X, Y;
        uint maxpoints;
    
    
        CPlot( uint _iPlot, bool _logx, bool _logy );
    
        void clearFrame();
        void plotFrame();
    
        void plotScan( bool as_line, 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 plotDoclines( const vector<string>& lDoc );
    
        void writePostscript( bool full_outfile );
        void setAux( string cmd );
        void feedGnuplot();
    
        string info() const;
    
    private: // can we move this to the .cpp file ?
    
        void gp_write( string );
    
        int gp_fno;
        string gp_fnames;
    
        uint ps_fnum; // file
        uint ps_snum; // scan
        uint ps_pnum; // scan with pstyle
        uint ps_cnum; // scan with cstyle
    
        void ps_ticktack( uint ntack, double *tack, int ntpt, double *ticklim,
                          CAxis *A );
    
        vector<string> ps_Doc;
        vector<string> ps_accu; // future output is accumulated here
        char outlin[ CPLOT_LINSIZ ];