Skip to content

Commit 739d8bd

Browse files
committed
example usage of legend's loc and bbox_to_anchor
1 parent c5a2b1d commit 739d8bd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/eigen/loglog.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ int main() {
2929
// Add graph title
3030
plt::title("Sample figure");
3131

32-
// Enable legend.
33-
plt::legend();
32+
// Put the legend in the center of the bottom right quadrant.
33+
// First argument: loc, second: bbox_to_anchor
34+
plt::legend("center", {0.5, 0, 0.5, 0.5});
3435

3536
// show figure
3637
plt::show();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy