PlotLegends`
PlotLegends`

PlotLegend

As of Version 9, all the functionality of the PlotLegends package is built into the Wolfram System. »

PlotLegend

is an option for Plot, ListPlot, and related functions that assigns text to lines in a 2D plot to create a legend for that plot.

Details and Options

  • To use PlotLegend, you first need to load the Plot Legends Package using Needs["PlotLegends`"].
  • PlotLegend->{text1,text2,} assigns text to each line in the same fashion as PlotStyle.
  • PlotLegend also enables Plot and related functions to accept options for Legend, which will modify the legend produced.

Examples

Basic Examples  (1)

Add a legend to a plot to identify curves:

Wolfram Research (2007), PlotLegend, Wolfram Language function, https://reference.wolfram.com/language/PlotLegends/ref/PlotLegend.html.

Text

Wolfram Research (2007), PlotLegend, Wolfram Language function, https://reference.wolfram.com/language/PlotLegends/ref/PlotLegend.html.

CMS

Wolfram Language. 2007. "PlotLegend." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/PlotLegends/ref/PlotLegend.html.

APA

Wolfram Language. (2007). PlotLegend. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/PlotLegends/ref/PlotLegend.html

BibTeX

@misc{reference.wolfram_2024_plotlegend, author="Wolfram Research", title="{PlotLegend}", year="2007", howpublished="\url{https://reference.wolfram.com/language/PlotLegends/ref/PlotLegend.html}", note=[Accessed: 18-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_plotlegend, organization={Wolfram Research}, title={PlotLegend}, year={2007}, url={https://reference.wolfram.com/language/PlotLegends/ref/PlotLegend.html}, note=[Accessed: 18-November-2024 ]}