# PetscDrawSetType
Builds graphics object for a particular implementation 
## Synopsis
```
#include "petscdraw.h" 
#include "petscviewer.h" 
PetscErrorCode PetscDrawSetType(PetscDraw draw, PetscDrawType type)
```
Collective


## Input Parameters

- ***draw      -*** the graphics context
- ***type      -*** for example, `PETSC_DRAW_X`



## Options Database Key

- ***-draw_type  <type> -*** Sets the type; use -help for a list of available methods (for instance, x)





## Note
See `PetscDrawSetFromOptions()` for additional options database keys

See "petsc/include/petscdraw.h" for available methods (for instance,
`PETSC_DRAW_X`, `PETSC_DRAW_TIKZ` or `PETSC_DRAW_IMAGE`)


## See Also
 `PetscDraw`, `PETSC_DRAW_X`, `PETSC_DRAW_TIKZ`, `PETSC_DRAW_IMAGE`, `PetscDrawSetFromOptions()`, `PetscDrawCreate()`, `PetscDrawDestroy()`, `PetscDrawType`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/draw/interface/drawreg.c.html#PetscDrawSetType">src/sys/classes/draw/interface/drawreg.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/draw/interface/drawreg.c)


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