Skip to content

Commit

Permalink
Formatted Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
25shriya committed Jun 18, 2024
1 parent 6f4e333 commit 9c49a29
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/sage/plot/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,13 +431,14 @@ def set_legend_options(self, **kwds):
sage: p.set_legend_options(loc=(0.5,0.5)); p # aligns the bottom of the box to the center # needs sage.symbolic
Graphics object consisting of 1 graphics primitive
The parameters ``loc`` and ``borderaxespad`` can be altered in order to place the legend below the x-axis label or to the left of the y-axis label.
The following example sets ``loc=3`` and ``borderaxespad = -7.5-0.01*p.fontsize()`` so as to obtain the legend below the x-axis label::
The parameters ``loc`` and ``borderaxespad`` can be altered
in order to place the legend below the x-axis label or to
the left of the y-axis label::
sage: p = line([(0, 0), (1, 1)], legend_label='test')
sage: p.axes_labels(['X-Label', 'Y-Label']) # adding labels for axes
sage: p.axes_labels(['X-Label', 'Y-Label']) # adding labels for axes
sage: p.set_legend_options(loc=8, borderaxespad=-7.5-0.01*p.fontsize())
sage: print(p)
sage: p
Graphics object consisting of 1 graphics primitive
"""
if len(kwds) == 0:
Expand Down

0 comments on commit 9c49a29

Please sign in to comment.