# PetscViewerDrawGetBounds
gets the upper and lower bounds to be used in plotting set with `PetscViewerDrawSetBounds()` 
## Synopsis
```
#include "petscdraw.h" 
#include "petscviewer.h" 
PetscErrorCode PetscViewerDrawGetBounds(PetscViewer viewer, PetscInt *nbounds, const PetscReal **bounds)
```
Collective


## Input Parameter

- ***viewer -*** the `PetscViewer` (created with `PetscViewerDrawOpen()`)



## Output Parameters

- ***nbounds -*** number of plots that can be made with this viewer, for example the dof passed to `DMDACreate()`
- ***bounds -*** the actual bounds, the size of this is 2*nbounds, the values are stored in the order min F_0, max F_0, min F_1, max F_1, .....





## See Also
 [](sec_viewers), `PETSCVIEWERDRAW`, `PetscViewerDrawGetLG()`, `PetscViewerDrawGetAxis()`, `PetscViewerDrawOpen()`, `PetscViewerDrawSetBounds()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/draw/drawv.c.html#PetscViewerDrawGetBounds">src/sys/classes/viewer/impls/draw/drawv.c</A>


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


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