00001 #pragma ident "$Id: SurfacePlot.hpp 3140 2012-06-18 15:03:02Z susancummins $"
00002
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef VPLOT_SURFACEPLOT_H
00028 #define VPLOT_SURFACEPLOT_H
00029
00030 #include <string>
00031 #include <vector>
00032 #include <map>
00033 #include <sstream>
00034 #include <iomanip>
00035 #include <math.h>
00036 #include <cmath>
00037 #include <limits.h>
00038 #include <algorithm>
00039
00040 #include "Bitmap.hpp"
00041 #include "ColorMap.hpp"
00042 #include "InterpolatedColorMap.hpp"
00043 #include "Frame.hpp"
00044 #include "HLayout.hpp"
00045 #include "StrokeStyle.hpp"
00046 #include "Path.hpp"
00047 #include "BorderLayout.hpp"
00048 #include "Palette.hpp"
00049
00050 #include "Axis.hpp"
00051 #include "AxisStyle.hpp"
00052 #include "Plot.hpp"
00053
00054 using namespace std;
00055 using namespace vdraw;
00056
00057 namespace vplot
00058 {
00062 class SurfacePlot : public Plot
00063 {
00064 public:
00065
00072 SurfacePlot(int iwidth, int iheight, const Palette& p);
00073
00075 ~SurfacePlot();
00076
00077
00078
00079
00081 inline void setColorLabel(const char* str) { colorlabel = std::string(str); }
00082
00084 void draw(Frame *frame, int dir);
00085
00087 void drawPlot(Frame* frame);
00088
00095 void drawKey(Frame *frame);
00096
00098 inline void set(int row, int col, double d)
00099 {
00100 icm.setColor(row,col,d);
00101 }
00102
00104 inline double get(int row, int col)
00105 {
00106 return icm.getIndex(row,col);
00107 }
00108
00110 inline void oversample(int scale) { oversample(scale,scale); }
00111
00113 inline void oversample(int rscale, int cscale) { osr = rscale; osc = cscale; }
00114
00116 inline void useBoxes(bool b=true) { boxes = b; }
00117
00118
00119
00120
00121
00123 AxisStyle axis_color;
00124
00125 protected:
00126
00127 private:
00129 std::string colorlabel;
00130
00132 int osr;
00133
00135 int osc;
00136
00138 bool boxes;
00139
00141 InterpolatedColorMap icm;
00142
00143 };
00144
00145 }
00146
00147 #endif //VPLOT_SURFACEPLOT_H
00148
00149