xref: /petsc/include/petscdraw.h (revision 76bdecfb13ff6dcb09bbf73e6c929f447c427e71)
143e6b640SBarry Smith /*
23fdcb5c1SBarry Smith   Interface to the PETSc graphics (currently only support for X-windows
343e6b640SBarry Smith */
40a835dfdSSatish Balay #if !defined(__PETSCDRAW_H)
50a835dfdSSatish Balay #define __PETSCDRAW_H
6d382aafbSBarry Smith #include "petscsys.h"
7e9fa29b7SSatish Balay PETSC_EXTERN_CXX_BEGIN
843e6b640SBarry Smith 
90700a824SBarry Smith extern PetscClassId PETSC_DRAW_CLASSID;
10f0479e8cSBarry Smith 
11*76bdecfbSBarry Smith /*J
12b9617806SBarry Smith     PetscDrawType - String with the name of a PetscDraw
13b9617806SBarry Smith 
14b9617806SBarry Smith    Level: beginner
15b9617806SBarry Smith 
16b9617806SBarry Smith .seealso: PetscDrawSetType(), PetscDraw, PetscViewer
17*76bdecfbSBarry Smith J*/
18a313700dSBarry Smith #define PetscDrawType  char*
19b0a32e0cSBarry Smith #define PETSC_DRAW_X     "x"
20b0a32e0cSBarry Smith #define PETSC_DRAW_NULL  "null"
21b0a32e0cSBarry Smith #define PETSC_DRAW_WIN32 "win32"
22d6dfbf8fSBarry Smith 
23b9617806SBarry Smith /*S
24b9617806SBarry Smith      PetscDraw - Abstract PETSc object for graphics
25b9617806SBarry Smith 
26b9617806SBarry Smith    Level: beginner
27b9617806SBarry Smith 
28b9617806SBarry Smith   Concepts: graphics
29b9617806SBarry Smith 
30b9617806SBarry Smith .seealso:  PetscDrawCreate(), PetscDrawSetType(), PetscDrawType
31b9617806SBarry Smith S*/
32b0a32e0cSBarry Smith typedef struct _p_PetscDraw* PetscDraw;
3343e6b640SBarry Smith 
34b0a32e0cSBarry Smith extern PetscFList PetscDrawList;
357087cfbeSBarry Smith extern PetscErrorCode  PetscDrawRegisterAll(const char[]);
367087cfbeSBarry Smith extern PetscErrorCode  PetscDrawInitializePackage(const char[]);
377087cfbeSBarry Smith extern PetscErrorCode  PetscDrawRegisterDestroy(void);
387b2a1423SBarry Smith 
397087cfbeSBarry Smith extern PetscErrorCode  PetscDrawRegister(const char*,const char*,const char*,PetscErrorCode(*)(PetscDraw));
4030de9b25SBarry Smith 
4130de9b25SBarry Smith /*MC
4230de9b25SBarry Smith    PetscDrawRegisterDynamic - Adds a method to the Krylov subspace solver package.
4330de9b25SBarry Smith 
4430de9b25SBarry Smith    Synopsis:
451890ba74SBarry Smith    PetscErrorCode PetscDrawRegisterDynamic(const char *name_solver,const char *path,const char *name_create,PetscErrorCode (*routine_create)(PetscDraw))
4630de9b25SBarry Smith 
4730de9b25SBarry Smith    Not Collective
4830de9b25SBarry Smith 
4930de9b25SBarry Smith    Input Parameters:
5030de9b25SBarry Smith +  name_solver - name of a new user-defined solver
5130de9b25SBarry Smith .  path - path (either absolute or relative) the library containing this solver
5230de9b25SBarry Smith .  name_create - name of routine to create method context
5330de9b25SBarry Smith -  routine_create - routine to create method context
5430de9b25SBarry Smith 
5530de9b25SBarry Smith    Level: developer
5630de9b25SBarry Smith 
5730de9b25SBarry Smith    Notes:
5830de9b25SBarry Smith    PetscDrawRegisterDynamic() may be called multiple times to add several user-defined solvers.
5930de9b25SBarry Smith 
6030de9b25SBarry Smith    If dynamic libraries are used, then the fourth input argument (routine_create)
6130de9b25SBarry Smith    is ignored.
6230de9b25SBarry Smith 
6330de9b25SBarry Smith    Sample usage:
6430de9b25SBarry Smith .vb
6530de9b25SBarry Smith    PetscDrawRegisterDynamic("my_draw_type",/home/username/my_lib/lib/libO/solaris/mylib.a,
6630de9b25SBarry Smith                "MyDrawCreate",MyDrawCreate);
6730de9b25SBarry Smith .ve
6830de9b25SBarry Smith 
6930de9b25SBarry Smith    Then, your solver can be chosen with the procedural interface via
7030de9b25SBarry Smith $     PetscDrawSetType(ksp,"my_draw_type")
7130de9b25SBarry Smith    or at runtime via the option
7230de9b25SBarry Smith $     -draw_type my_draw_type
7330de9b25SBarry Smith 
7430de9b25SBarry Smith    Concepts: graphics^registering new draw classes
7530de9b25SBarry Smith    Concepts: PetscDraw^registering new draw classes
7630de9b25SBarry Smith 
7730de9b25SBarry Smith .seealso: PetscDrawRegisterAll(), PetscDrawRegisterDestroy()
7830de9b25SBarry Smith M*/
79aa482453SBarry Smith #if defined(PETSC_USE_DYNAMIC_LIBRARIES)
80b0a32e0cSBarry Smith #define PetscDrawRegisterDynamic(a,b,c,d) PetscDrawRegister(a,b,c,0)
817b2a1423SBarry Smith #else
82b0a32e0cSBarry Smith #define PetscDrawRegisterDynamic(a,b,c,d) PetscDrawRegister(a,b,c,d)
837b2a1423SBarry Smith #endif
8430de9b25SBarry Smith 
857087cfbeSBarry Smith extern PetscErrorCode  PetscDrawGetType(PetscDraw,const PetscDrawType*);
867087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetType(PetscDraw,const PetscDrawType);
877087cfbeSBarry Smith extern PetscErrorCode  PetscDrawCreate(MPI_Comm,const char[],const char[],int,int,int,int,PetscDraw*);
887087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetFromOptions(PetscDraw);
8931e6f798SBarry Smith extern PetscErrorCode  PetscDrawSetSave(PetscDraw,const char*);
907b2a1423SBarry Smith 
910752156aSBarry Smith /*
920752156aSBarry Smith    Number of basic colors in the draw routines, the others are used
930752156aSBarry Smith    for a uniform colormap.
940752156aSBarry Smith */
95b0a32e0cSBarry Smith #define PETSC_DRAW_BASIC_COLORS 33
960752156aSBarry Smith 
97b0a32e0cSBarry Smith #define PETSC_DRAW_ROTATE          -1         /* will rotate through the colors, start with 2 */
98b0a32e0cSBarry Smith #define PETSC_DRAW_WHITE            0
99b0a32e0cSBarry Smith #define PETSC_DRAW_BLACK            1
100b0a32e0cSBarry Smith #define PETSC_DRAW_RED              2
101799879dbSBarry Smith #define PETSC_DRAW_GREEN            3
102b0a32e0cSBarry Smith #define PETSC_DRAW_CYAN             4
103b0a32e0cSBarry Smith #define PETSC_DRAW_BLUE             5
104b0a32e0cSBarry Smith #define PETSC_DRAW_MAGENTA          6
105b0a32e0cSBarry Smith #define PETSC_DRAW_AQUAMARINE       7
106b0a32e0cSBarry Smith #define PETSC_DRAW_FORESTGREEN      8
107b0a32e0cSBarry Smith #define PETSC_DRAW_ORANGE           9
108b0a32e0cSBarry Smith #define PETSC_DRAW_VIOLET          10
109b0a32e0cSBarry Smith #define PETSC_DRAW_BROWN           11
110b0a32e0cSBarry Smith #define PETSC_DRAW_PINK            12
111b0a32e0cSBarry Smith #define PETSC_DRAW_CORAL           13
112b0a32e0cSBarry Smith #define PETSC_DRAW_GRAY            14
113799879dbSBarry Smith #define PETSC_DRAW_YELLOW          15
11420563c6bSBarry Smith 
115b0a32e0cSBarry Smith #define PETSC_DRAW_GOLD            16
116b0a32e0cSBarry Smith #define PETSC_DRAW_LIGHTPINK       17
117b0a32e0cSBarry Smith #define PETSC_DRAW_MEDIUMTURQUOISE 18
118b0a32e0cSBarry Smith #define PETSC_DRAW_KHAKI           19
119b0a32e0cSBarry Smith #define PETSC_DRAW_DIMGRAY         20
120b0a32e0cSBarry Smith #define PETSC_DRAW_YELLOWGREEN     21
121b0a32e0cSBarry Smith #define PETSC_DRAW_SKYBLUE         22
122b0a32e0cSBarry Smith #define PETSC_DRAW_DARKGREEN       23
123b0a32e0cSBarry Smith #define PETSC_DRAW_NAVYBLUE        24
124b0a32e0cSBarry Smith #define PETSC_DRAW_SANDYBROWN      25
125b0a32e0cSBarry Smith #define PETSC_DRAW_CADETBLUE       26
126b0a32e0cSBarry Smith #define PETSC_DRAW_POWDERBLUE      27
127b0a32e0cSBarry Smith #define PETSC_DRAW_DEEPPINK        28
128b0a32e0cSBarry Smith #define PETSC_DRAW_THISTLE         29
129b0a32e0cSBarry Smith #define PETSC_DRAW_LIMEGREEN       30
130b0a32e0cSBarry Smith #define PETSC_DRAW_LAVENDERBLUSH   31
131b0a32e0cSBarry Smith #define PETSC_DRAW_PLUM            32
1320752156aSBarry Smith 
1337087cfbeSBarry Smith extern PetscErrorCode  PetscDrawOpenX(MPI_Comm,const char[],const char[],int,int,int,int,PetscDraw*);
1347087cfbeSBarry Smith extern PetscErrorCode  PetscDrawOpenPS(MPI_Comm,char *,PetscDraw *);
135b0a32e0cSBarry Smith #define PETSC_DRAW_FULL_SIZE    -3
136b0a32e0cSBarry Smith #define PETSC_DRAW_HALF_SIZE    -4
137b0a32e0cSBarry Smith #define PETSC_DRAW_THIRD_SIZE   -5
138b0a32e0cSBarry Smith #define PETSC_DRAW_QUARTER_SIZE -6
139e340e5c6SBarry Smith 
1407087cfbeSBarry Smith extern PetscErrorCode  PetscDrawOpenNull(MPI_Comm,PetscDraw *);
141fcfd50ebSBarry Smith extern PetscErrorCode  PetscDrawDestroy(PetscDraw*);
1427087cfbeSBarry Smith extern PetscErrorCode  PetscDrawIsNull(PetscDraw,PetscBool *);
14343e6b640SBarry Smith 
1447087cfbeSBarry Smith extern PetscErrorCode  PetscDrawGetPopup(PetscDraw,PetscDraw*);
1457087cfbeSBarry Smith extern PetscErrorCode  PetscDrawCheckResizedWindow(PetscDraw);
1467087cfbeSBarry Smith extern PetscErrorCode  PetscDrawResizeWindow(PetscDraw,int,int);
147d4fbbf0eSBarry Smith 
1487087cfbeSBarry Smith extern PetscErrorCode  PetscDrawScalePopup(PetscDraw,PetscReal,PetscReal);
1495311e20fSBarry Smith 
1507087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLine(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,int);
15187068094SBarry Smith extern PetscErrorCode  PetscDrawArrow(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,int);
1527087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLineSetWidth(PetscDraw,PetscReal);
1537087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLineGetWidth(PetscDraw,PetscReal*);
15443e6b640SBarry Smith 
1557087cfbeSBarry Smith extern PetscErrorCode  PetscDrawPoint(PetscDraw,PetscReal,PetscReal,int);
1567087cfbeSBarry Smith extern PetscErrorCode  PetscDrawPointSetSize(PetscDraw,PetscReal);
1578ed539a5SBarry Smith 
1587087cfbeSBarry Smith extern PetscErrorCode  PetscDrawRectangle(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,int,int,int,int);
1597087cfbeSBarry Smith extern PetscErrorCode  PetscDrawTriangle(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,PetscReal,PetscReal,int,int,int);
1607087cfbeSBarry Smith extern PetscErrorCode  PetscDrawEllipse(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal,int);
1617087cfbeSBarry Smith extern PetscErrorCode  PetscDrawTensorContourPatch(PetscDraw,int,int,PetscReal*,PetscReal*,PetscReal,PetscReal,PetscReal*);
1627087cfbeSBarry Smith extern PetscErrorCode  PetscDrawTensorContour(PetscDraw,int,int,const PetscReal[],const PetscReal[],PetscReal *);
1638ed539a5SBarry Smith 
1647087cfbeSBarry Smith extern PetscErrorCode  PetscDrawString(PetscDraw,PetscReal,PetscReal,int,const char[]);
1657087cfbeSBarry Smith extern PetscErrorCode  PetscDrawStringVertical(PetscDraw,PetscReal,PetscReal,int,const char[]);
1667087cfbeSBarry Smith extern PetscErrorCode  PetscDrawStringSetSize(PetscDraw,PetscReal,PetscReal);
1677087cfbeSBarry Smith extern PetscErrorCode  PetscDrawStringGetSize(PetscDraw,PetscReal*,PetscReal*);
168d6dfbf8fSBarry Smith 
1697087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetViewPort(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal);
1707087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSplitViewPort(PetscDraw);
1712bdab257SBarry Smith 
1727087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetCoordinates(PetscDraw,PetscReal,PetscReal,PetscReal,PetscReal);
1737087cfbeSBarry Smith extern PetscErrorCode  PetscDrawGetCoordinates(PetscDraw,PetscReal*,PetscReal*,PetscReal*,PetscReal*);
1749e25ed09SBarry Smith 
1757087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetTitle(PetscDraw,const char[]);
1767087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAppendTitle(PetscDraw,const char[]);
1777087cfbeSBarry Smith extern PetscErrorCode  PetscDrawGetTitle(PetscDraw,char **);
178d4fbbf0eSBarry Smith 
1797087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetPause(PetscDraw,PetscReal);
1807087cfbeSBarry Smith extern PetscErrorCode  PetscDrawGetPause(PetscDraw,PetscReal*);
1817087cfbeSBarry Smith extern PetscErrorCode  PetscDrawPause(PetscDraw);
1827087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetDoubleBuffer(PetscDraw);
1837087cfbeSBarry Smith extern PetscErrorCode  PetscDrawFlush(PetscDraw);
1847087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSynchronizedFlush(PetscDraw);
1857087cfbeSBarry Smith extern PetscErrorCode  PetscDrawClear(PetscDraw);
18631e6f798SBarry Smith extern PetscErrorCode  PetscDrawSave(PetscDraw);
1877087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSynchronizedClear(PetscDraw);
1887087cfbeSBarry Smith extern PetscErrorCode  PetscDrawBOP(PetscDraw);
1897087cfbeSBarry Smith extern PetscErrorCode  PetscDrawEOP(PetscDraw);
190cddf8d76SBarry Smith 
1917087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSetDisplay(PetscDraw,char*);
192a3489287SBarry Smith #define PetscDrawSetFilename(a,b) PetscDrawSetDisplay(a,b)
193a3489287SBarry Smith 
1947087cfbeSBarry Smith extern PetscErrorCode  PetscDrawGetSingleton(PetscDraw,PetscDraw*);
1957087cfbeSBarry Smith extern PetscErrorCode  PetscDrawRestoreSingleton(PetscDraw,PetscDraw*);
1966831982aSBarry Smith 
197b9617806SBarry Smith /*E
198b9617806SBarry Smith     PetscDrawButton - Used to determine which button was pressed
199b9617806SBarry Smith 
200b9617806SBarry Smith    Level: intermediate
201b9617806SBarry Smith 
202b9617806SBarry Smith .seealso: PetscDrawGetMouseButton(), PetscDrawSynchronizedGetMouseButton()
203b9617806SBarry Smith E*/
2044ebda54eSMatthew Knepley typedef enum {BUTTON_NONE,BUTTON_LEFT,BUTTON_CENTER,BUTTON_RIGHT,BUTTON_LEFT_SHIFT,BUTTON_CENTER_SHIFT,BUTTON_RIGHT_SHIFT} PetscDrawButton;
205b9617806SBarry Smith 
2067087cfbeSBarry Smith extern PetscErrorCode  PetscDrawGetMouseButton(PetscDraw,PetscDrawButton *,PetscReal*,PetscReal *,PetscReal *,PetscReal *);
2077087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSynchronizedGetMouseButton(PetscDraw,PetscDrawButton *,PetscReal*,PetscReal *,PetscReal *,PetscReal *);
20820563c6bSBarry Smith 
2097087cfbeSBarry Smith extern PetscErrorCode  PetscDrawZoom(PetscDraw,PetscErrorCode (*)(PetscDraw,void *),void *);
2107c922b88SBarry Smith 
211b9617806SBarry Smith /*S
212b9617806SBarry Smith      PetscDrawViewPorts - Subwindows in a PetscDraw object
213b9617806SBarry Smith 
214b9617806SBarry Smith    Level: intermediate
215b9617806SBarry Smith 
216b9617806SBarry Smith   Concepts: graphics
217b9617806SBarry Smith 
218b9617806SBarry Smith .seealso:  PetscDrawViewPortsCreate(), PetscDrawViewPortsSet()
219b9617806SBarry Smith S*/
2207c922b88SBarry Smith typedef struct {
2217c307921SBarry Smith   PetscInt  nports;
22267e28bfeSBarry Smith   PetscReal *xl;
22367e28bfeSBarry Smith   PetscReal *xr;
22467e28bfeSBarry Smith   PetscReal *yl;
22567e28bfeSBarry Smith   PetscReal *yr;
226b0a32e0cSBarry Smith   PetscDraw draw;
227b0a32e0cSBarry Smith } PetscDrawViewPorts;
2287087cfbeSBarry Smith extern PetscErrorCode  PetscDrawViewPortsCreate(PetscDraw,PetscInt,PetscDrawViewPorts**);
2297087cfbeSBarry Smith extern PetscErrorCode  PetscDrawViewPortsCreateRect(PetscDraw,PetscInt,PetscInt,PetscDrawViewPorts**);
2307087cfbeSBarry Smith extern PetscErrorCode  PetscDrawViewPortsDestroy(PetscDrawViewPorts*);
2317087cfbeSBarry Smith extern PetscErrorCode  PetscDrawViewPortsSet(PetscDrawViewPorts*,PetscInt);
2327c922b88SBarry Smith 
233b9617806SBarry Smith /*S
234b9617806SBarry Smith      PetscDrawAxis - Manages X-Y axis
235b9617806SBarry Smith 
236b9617806SBarry Smith    Level: advanced
237b9617806SBarry Smith 
238b9617806SBarry Smith   Concepts: graphics, axis
239b9617806SBarry Smith 
240b9617806SBarry Smith .seealso:  PetscDrawAxisCreate(), PetscDrawAxisSetLimits(), PetscDrawAxisSetColors(), PetscDrawAxisSetLabels()
241b9617806SBarry Smith S*/
242b0a32e0cSBarry Smith typedef struct _p_DrawAxis* PetscDrawAxis;
243b9617806SBarry Smith 
2440700a824SBarry Smith extern PetscClassId DRAWAXIS_CLASSID;
2458ba1e511SMatthew Knepley 
2467087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAxisCreate(PetscDraw,PetscDrawAxis *);
247fcfd50ebSBarry Smith extern PetscErrorCode  PetscDrawAxisDestroy(PetscDrawAxis*);
2487087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAxisDraw(PetscDrawAxis);
2497087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAxisSetLimits(PetscDrawAxis,PetscReal,PetscReal,PetscReal,PetscReal);
2507087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAxisSetHoldLimits(PetscDrawAxis,PetscBool );
2517087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAxisSetColors(PetscDrawAxis,int,int,int);
2527087cfbeSBarry Smith extern PetscErrorCode  PetscDrawAxisSetLabels(PetscDrawAxis,const char[],const char[],const char[]);
25320563c6bSBarry Smith 
254b9617806SBarry Smith /*S
255b9617806SBarry Smith      PetscDrawLG - Manages drawing x-y plots
256b9617806SBarry Smith 
257b9617806SBarry Smith    Level: advanced
258b9617806SBarry Smith 
259b9617806SBarry Smith   Concepts: graphics, axis
260b9617806SBarry Smith 
261b9617806SBarry Smith .seealso:  PetscDrawAxisCreate(), PetscDrawLGCreate(), PetscDrawLGAddPoint()
262b9617806SBarry Smith S*/
26387068094SBarry Smith typedef struct _p_PetscDrawLG*   PetscDrawLG;
264b9617806SBarry Smith 
2650700a824SBarry Smith extern PetscClassId DRAWLG_CLASSID;
2668ba1e511SMatthew Knepley 
2677087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGCreate(PetscDraw,int,PetscDrawLG *);
268fcfd50ebSBarry Smith extern PetscErrorCode  PetscDrawLGDestroy(PetscDrawLG*);
2697087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGAddPoint(PetscDrawLG,PetscReal*,PetscReal*);
2707087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGAddPoints(PetscDrawLG,int,PetscReal**,PetscReal**);
2717087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGDraw(PetscDrawLG);
2727087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGPrint(PetscDrawLG);
2737087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGReset(PetscDrawLG);
2747087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGSetDimension(PetscDrawLG,PetscInt);
2754a0d0026SBarry Smith extern PetscErrorCode  PetscDrawLGSetLegend(PetscDrawLG,const char *const*);
2767087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGGetAxis(PetscDrawLG,PetscDrawAxis *);
2777087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGGetDraw(PetscDrawLG,PetscDraw *);
2787087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGIndicateDataPoints(PetscDrawLG);
2797087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGSetLimits(PetscDrawLG,PetscReal,PetscReal,PetscReal,PetscReal);
28087068094SBarry Smith extern PetscErrorCode  PetscDrawLGSetColors(PetscDrawLG,const int*);
28143e6b640SBarry Smith 
282b9617806SBarry Smith /*S
283b9617806SBarry Smith      PetscDrawSP - Manages drawing scatter plots
284b9617806SBarry Smith 
285b9617806SBarry Smith    Level: advanced
286b9617806SBarry Smith 
287b9617806SBarry Smith   Concepts: graphics, scatter plots
288b9617806SBarry Smith 
289b9617806SBarry Smith .seealso:  PetscDrawSPCreate()
290b9617806SBarry Smith S*/
291b0a32e0cSBarry Smith typedef struct _p_DrawSP*   PetscDrawSP;
292b9617806SBarry Smith 
2930700a824SBarry Smith extern PetscClassId DRAWSP_CLASSID;
2948ba1e511SMatthew Knepley 
2957087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPCreate(PetscDraw,int,PetscDrawSP *);
296fcfd50ebSBarry Smith extern PetscErrorCode  PetscDrawSPDestroy(PetscDrawSP*);
2977087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPAddPoint(PetscDrawSP,PetscReal*,PetscReal*);
2987087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPAddPoints(PetscDrawSP,int,PetscReal**,PetscReal**);
2997087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPDraw(PetscDrawSP);
3007087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPReset(PetscDrawSP);
3017087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPSetDimension(PetscDrawSP,int);
3027087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPGetAxis(PetscDrawSP,PetscDrawAxis *);
3037087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPGetDraw(PetscDrawSP,PetscDraw *);
3047087cfbeSBarry Smith extern PetscErrorCode  PetscDrawSPSetLimits(PetscDrawSP,PetscReal,PetscReal,PetscReal,PetscReal);
3057087cfbeSBarry Smith extern PetscErrorCode  PetscDrawLGSPDraw(PetscDrawLG,PetscDrawSP);
306d4fbbf0eSBarry Smith 
307b9617806SBarry Smith /*S
308b9617806SBarry Smith      PetscDrawHG - Manages drawing histograms
309b9617806SBarry Smith 
310b9617806SBarry Smith    Level: advanced
311b9617806SBarry Smith 
312b9617806SBarry Smith   Concepts: graphics, histograms
313b9617806SBarry Smith 
314b9617806SBarry Smith .seealso:  PetscDrawHGCreate()
315b9617806SBarry Smith S*/
316b0a32e0cSBarry Smith typedef struct _p_DrawHG*   PetscDrawHG;
317b9617806SBarry Smith 
3180700a824SBarry Smith extern PetscClassId DRAWHG_CLASSID;
3198ba1e511SMatthew Knepley 
3207087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGCreate(PetscDraw,int,PetscDrawHG *);
321fcfd50ebSBarry Smith extern PetscErrorCode  PetscDrawHGDestroy(PetscDrawHG*);
3227087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGAddValue(PetscDrawHG,PetscReal);
3237087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGDraw(PetscDrawHG);
3247087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGPrint(PetscDrawHG);
3257087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGReset(PetscDrawHG);
3267087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGGetAxis(PetscDrawHG,PetscDrawAxis *);
3277087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGGetDraw(PetscDrawHG,PetscDraw *);
3287087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGSetLimits(PetscDrawHG,PetscReal,PetscReal,int,int);
3297087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGSetNumberBins(PetscDrawHG,int);
3307087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGSetColor(PetscDrawHG,int);
3317087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGCalcStats(PetscDrawHG, PetscBool );
3327087cfbeSBarry Smith extern PetscErrorCode  PetscDrawHGIntegerBins(PetscDrawHG, PetscBool );
333ba6fa466SBarry Smith 
334ba6fa466SBarry Smith /*
335b0a32e0cSBarry Smith     PetscViewer routines that allow you to access underlying PetscDraw objects
3363f1d51d7SBarry Smith */
3377087cfbeSBarry Smith extern PetscErrorCode  PetscViewerDrawGetDraw(PetscViewer,PetscInt,PetscDraw*);
3387087cfbeSBarry Smith extern PetscErrorCode  PetscViewerDrawBaseAdd(PetscViewer,PetscInt);
3397087cfbeSBarry Smith extern PetscErrorCode  PetscViewerDrawBaseSet(PetscViewer,PetscInt);
3407087cfbeSBarry Smith extern PetscErrorCode  PetscViewerDrawGetDrawLG(PetscViewer,PetscInt,PetscDrawLG*);
3417087cfbeSBarry Smith extern PetscErrorCode  PetscViewerDrawGetDrawAxis(PetscViewer,PetscInt,PetscDrawAxis*);
3425311e20fSBarry Smith 
3437087cfbeSBarry Smith extern PetscErrorCode  PetscDrawUtilitySetCmapHue(unsigned char *,unsigned char *,unsigned char *,int);
3447087cfbeSBarry Smith extern PetscErrorCode  PetscDrawUtilitySetGamma(PetscReal);
3457c922b88SBarry Smith 
346e9fa29b7SSatish Balay PETSC_EXTERN_CXX_END
34743e6b640SBarry Smith #endif
348