:orphan:
# PetscDrawLGSetLegend
sets the names of each curve plotted 
## Synopsis
```
#include "petscdraw.h"  
PetscErrorCode PetscDrawLGSetLegend(PetscDrawLG lg, const char *const *names)
```
Logically Collective


## Input Parameters

- ***lg -*** the line graph context.
- ***names -*** the names for each curve





## Note
Call `PetscDrawLGGetAxis()` and then change properties of the `PetscDrawAxis` for detailed control of the plot


## See Also
 `PetscDrawLGGetAxis()`, `PetscDrawAxis`, `PetscDrawAxisSetColors()`, `PetscDrawAxisSetLabels()`, `PetscDrawAxisSetHoldLimits()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/draw/utils/lgc.c.html#PetscDrawLGSetLegend">src/sys/classes/draw/utils/lgc.c</A>


---
[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)  
