# TSMonitorDrawCtxCreate
Creates the monitor context for `TSMonitorDrawCtx` 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSMonitorDrawCtxCreate(MPI_Comm comm, const char host[], const char label[], int x, int y, int m, int n, PetscInt howoften, TSMonitorDrawCtx *ctx)
```
Collective on ts


## Input Parameter

- ***ts -*** time-step context



## Output Parameter

- ***ctx -*** the monitor context



## Options Database Keys

- ***-ts_monitor_draw_solution -*** draw the solution at each time-step
- ***-ts_monitor_draw_solution_initial -*** show initial solution as well as current solution





## Note
The context created by this function,  `PetscMonitorDrawSolution()`, and `TSMonitorDrawCtxDestroy()` should be passed together to `TSMonitorSet()`.


## See Also
 [](chapter_ts), `TS`, `TSMonitorDrawCtxDestroy()`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorDrawCtx`, `PetscMonitorDrawSolution()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/interface/tsmon.c.html#TSMonitorDrawCtxCreate">src/ts/interface/tsmon.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/interface/tsmon.c)


[Index of all TS routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
