:orphan:
# PetscDrawLGCreate
Creates a line graph data structure.
## Synopsis
```
#include "petscdraw.h"
PetscErrorCode PetscDrawLGCreate(PetscDraw draw, PetscInt dim, PetscDrawLG *outlg)
```
Collective
## Input Parameters
- ***draw -*** the window where the graph will be made.
- ***dim -*** the number of curves which will be drawn
## Output Parameter
- ***outlg -*** the line graph context
## Notes
The MPI communicator that owns the `PetscDraw` owns this `PetscDrawLG`, but the calls to set options and add points are ignored on all processes except the
zeroth MPI process in the communicator.
All MPI ranks in the communicator must call `PetscDrawLGDraw()` to display the updated graph.
## See Also
`PetscDrawLGCreate`, `PetscDrawLGDestroy()`, `PetscDrawLGAddPoint()`, `PetscDrawLGAddCommonPoint()`, `PetscDrawLGAddPoints()`, `PetscDrawLGDraw()`, `PetscDrawLGSave()`,
`PetscDrawLGView()`, `PetscDrawLGReset()`, `PetscDrawLGSetDimension()`, `PetscDrawLGGetDimension()`, `PetscDrawLGSetLegend()`, `PetscDrawLGGetAxis()`,
`PetscDrawLGGetDraw()`, `PetscDrawLGSetUseMarkers()`, `PetscDrawLGSetLimits()`, `PetscDrawLGSetColors()`, `PetscDrawLGSetOptionsPrefix()`, `PetscDrawLGSetFromOptions()`
## Level
intermediate
## Location
src/sys/classes/draw/utils/lgc.c
## Examples
src/ksp/ksp/tutorials/ex68.c
src/ksp/ksp/tutorials/ex69.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/draw/utils/lgc.c)
[Index of all Draw routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)