KnowledgeBoat Logo
|

Informatics Practices

Write the specific purpose of the following functions used in plotting:

(a) show()

(b) legend()

PyPlot

2 Likes

Answer

(a) show() — The purpose of the show() function is to display the plot.

(b) legend() — The purpose of the legend() function is to add a legend to the plot. In a chart/graph, there may be multiple datasets plotted. To distinguish among various datasets plotted in the same chart, legends are used. Legends can be different colors/patterns assigned to different specific datasets. The legends are shown in a corner of a chart/graph.

Answered By

1 Like


Related Questions