# PetscViewerDrawGetDrawLG
Returns a `PetscDrawLG` object from `PetscViewer` object of type `PETSCVIEWERDRAW`. This `PetscDrawLG` object may then be used to perform graphics using `PetscDrawLG` commands. 
## Synopsis
```
#include "petscdraw.h" 
#include "petscviewer.h" 
PetscErrorCode PetscViewerDrawGetDrawLG(PetscViewer viewer, PetscInt windownumber, PetscDrawLG *drawlg)
```
Collective


## Input Parameters

- ***PetscViewer -*** the `PetscViewer` (created with `PetscViewerDrawOpen()`)
- ***windownumber -*** indicates which subwindow (usually 0)



## Output Parameter

- ***draw -*** the draw line graph object





## Note
A `PETSCVIEWERDRAW` may have multiple `PetscDraw` subwindows


## See Also
 [](sec_viewers), `PetscDrawLG`, `PetscViewerDrawGetDraw()`, `PetscViewerDrawGetAxis()`, `PetscViewerDrawOpen()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/draw/drawv.c.html#PetscViewerDrawGetDrawLG">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)  
