|
293 | 293 | \begin{myboxed}{Subplots layout \hfill |
294 | 294 | \API{https://matplotlib.org/tutorials/intermediate/gridspec.html} } |
295 | 295 | \plot{layout-subplot.pdf}{\textbf{subplot[s]}(rows,cols,…)} |
296 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.subplots.html} |
| 296 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.subplots.html} |
297 | 297 | {\ttfamily fig, axs = plt.subplots(3,3)} |
298 | 298 | {} |
299 | 299 | \plot{layout-gridspec.pdf}{G = \textbf{gridspec}(rows,cols,…)} |
300 | | - {https://matplotlib.org/api/_as_gen/matplotlib.gridspec.GridSpec.html} |
| 300 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.gridspec.GridSpec.html} |
301 | 301 | {\ttfamily ax = G[0,:]}{} |
302 | 302 | \plot{layout-inset.pdf}{ax.\textbf{inset\_axes}(extent)} |
303 | | - {https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.inset_axes.html} |
| 303 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.inset_axes.html} |
304 | 304 | {}{} |
305 | 305 | \plot{layout-divider.pdf}{d=\textbf{make\_axes\_locatable}(ax)} |
306 | 306 | {https://matplotlib.org/mpl_toolkits/axes_grid/users/axes_divider.html} |
|
337 | 337 | % --- Basic plots ----------------------------------------------------------- |
338 | 338 | \begin{myboxed}{Basic plots} |
339 | 339 | \plot{basic-plot.pdf}{\textbf{plot}([X],Y,[fmt],…)} |
340 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.plot.html} |
| 340 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.plot.html} |
341 | 341 | {\optional{X}, |
342 | 342 | \mandatory{Y}, |
343 | 343 | \optional{fmt}, |
|
346 | 346 | \optional{linestyle}} |
347 | 347 | {} |
348 | 348 | \plot{basic-scatter.pdf}{\textbf{scatter}(X,Y,…)} |
349 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.scatter.html} |
| 349 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.scatter.html} |
350 | 350 | {\mandatory{X}, |
351 | 351 | \mandatory{Y}, |
352 | 352 | \optional{[s]izes}, |
|
355 | 355 | \optional{cmap}} |
356 | 356 | {} |
357 | 357 | \plot{basic-bar.pdf}{\textbf{bar[h]}(x,height,…)} |
358 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.bar.html} |
| 358 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.bar.html} |
359 | 359 | { \mandatory{x}, |
360 | 360 | \mandatory{height}, |
361 | 361 | \optional{width}, |
362 | 362 | \optional{bottom}, |
363 | 363 | \optional{align}, |
364 | 364 | \optional{color} }{} |
365 | 365 | \plot{basic-imshow.pdf}{\textbf{imshow}(Z,[cmap],…)} |
366 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.imshow.html} |
| 366 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.imshow.html} |
367 | 367 | { \mandatory{Z}, |
368 | 368 | \optional{cmap}, |
369 | 369 | \optional{interpolation}, |
370 | 370 | \optional{extent}, |
371 | 371 | \optional{origin} } |
372 | 372 | {} |
373 | 373 | \plot{basic-contour.pdf}{\textbf{contour[f]}([X],[Y],Z,,…)} |
374 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.contour.html} |
| 374 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.contour.html} |
375 | 375 | { \optional{X}, |
376 | 376 | \optional{Y}, |
377 | 377 | \mandatory{Z}, |
|
381 | 381 | \optional{origin} } |
382 | 382 | {} |
383 | 383 | \plot{basic-quiver.pdf}{\textbf{quiver}([X],[Y],U,V,…)} |
384 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.quiver.html} |
| 384 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.quiver.html} |
385 | 385 | { \optional{X}, |
386 | 386 | \optional{Y}, |
387 | 387 | \mandatory{U}, |
|
391 | 391 | \optional{angles} } |
392 | 392 | {} |
393 | 393 | \plot{basic-pie.pdf}{\textbf{pie}(X,[explode],…)} |
394 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.pie.html} |
| 394 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.pie.html} |
395 | 395 | {\mandatory{Z}, |
396 | 396 | \optional{explode}, |
397 | 397 | \optional{labels}, |
398 | 398 | \optional{colors}, |
399 | 399 | \optional{radius}} |
400 | 400 | {} |
401 | 401 | \plot{basic-text.pdf}{\textbf{text}(x,y,text,…)} |
402 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.text.html} |
| 402 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.text.html} |
403 | 403 | {\mandatory{x}, |
404 | 404 | \mandatory{y}, |
405 | 405 | \mandatory{text}, |
|
410 | 410 | \optional{transform} } |
411 | 411 | {} |
412 | 412 | \plot{basic-fill.pdf}{\textbf{fill[\_between][x]}( … )} |
413 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.fill.html} |
| 413 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.fill.html} |
414 | 414 | {\mandatory{X}, |
415 | 415 | \optional{Y1}, |
416 | 416 | \optional{Y2}, |
|
422 | 422 | % --- Advanced plots -------------------------------------------------------- |
423 | 423 | \begin{myboxed}{Advanced plots} |
424 | 424 | \plot{advanced-step.pdf}{\textbf{step}(X,Y,[fmt],…)} |
425 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.step.html} |
| 425 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.step.html} |
426 | 426 | {\mandatory{X}, |
427 | 427 | \mandatory{Y}, |
428 | 428 | \optional{fmt}, |
|
431 | 431 | \optional{where} } |
432 | 432 | {} |
433 | 433 | \plot{advanced-boxplot.pdf}{\textbf{boxplot}(X,…)} |
434 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.boxplot.html} |
| 434 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.boxplot.html} |
435 | 435 | { \mandatory{X}, |
436 | 436 | \optional{notch}, |
437 | 437 | \optional{sym}, |
438 | 438 | \optional{bootstrap}, |
439 | 439 | \optional{widths} } |
440 | 440 | {} |
441 | 441 | \plot{advanced-errorbar.pdf}{\textbf{errorbar}(X,Y,xerr,yerr,…)} |
442 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.errorbar.html} |
| 442 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.errorbar.html} |
443 | 443 | { \mandatory{X}, |
444 | 444 | \mandatory{Y}, |
445 | 445 | \optional{xerr}, |
446 | 446 | \optional{yerr}, |
447 | 447 | \optional{fmt} } |
448 | 448 | {} |
449 | 449 | \plot{advanced-hist.pdf}{\textbf{hist}(X, bins, …)} |
450 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.hist.html} |
| 450 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.hist.html} |
451 | 451 | {\mandatory{X}, |
452 | 452 | \optional{bins}, |
453 | 453 | \optional{range}, |
454 | 454 | \optional{density}, |
455 | 455 | \optional{weights}} |
456 | 456 | {} |
457 | 457 | \plot{advanced-violin.pdf}{\textbf{violinplot}(D,…)} |
458 | | - {https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.violinplot.html} |
| 458 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.violinplot.html} |
459 | 459 | {\mandatory{D}, |
460 | 460 | \optional{positions}, |
461 | 461 | \optional{widths}, |
462 | 462 | \optional{vert} } |
463 | 463 | {} |
464 | 464 | \plot{advanced-barbs.pdf}{\textbf{barbs}([X],[Y], U, V, …)} |
465 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.barbs.html} |
| 465 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.barbs.html} |
466 | 466 | { \optional{X}, |
467 | 467 | \optional{Y}, |
468 | 468 | \mandatory{U}, |
|
473 | 473 | \optional{sizes} } |
474 | 474 | {} |
475 | 475 | \plot{advanced-event.pdf}{\textbf{eventplot}(positions,…)} |
476 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.eventplot.html} |
| 476 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.eventplot.html} |
477 | 477 | {\mandatory{positions}, |
478 | 478 | \optional{orientation}, |
479 | 479 | \optional{lineoffsets} } |
480 | 480 | {} |
481 | 481 | \plot{advanced-hexbin.pdf}{\textbf{hexbin}(X,Y,C,…)} |
482 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.hexbin.html} |
| 482 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.hexbin.html} |
483 | 483 | {\mandatory{X}, |
484 | 484 | \mandatory{Y}, |
485 | 485 | \optional{C}, |
486 | 486 | \optional{gridsize}, |
487 | 487 | \optional{bins} } |
488 | 488 | {} |
489 | 489 | \plot{advanced-xcorr.pdf}{\textbf{xcorr}(X,Y,…)} |
490 | | - {https://matplotlib.org/api/_as_gen/matplotlib.pyplot.xcorr.html} |
| 490 | + {https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.xcorr.html} |
491 | 491 | {\mandatory{X}, |
492 | 492 | \mandatory{Y}, |
493 | 493 | \optional{normed}, |
|
498 | 498 |
|
499 | 499 | % --- Scale --------------------------------------------------------------- |
500 | 500 | \begin{myboxed}{Scales \hfill |
501 | | - \API{https://matplotlib.org/api/scale_api.html}} |
| 501 | + \API{https://matplotlib.org/stable/api/scale_api.html}} |
502 | 502 | {\ttfamily ax.\textbf{set\_[xy]scale}(scale,…)} |
503 | 503 | \smallskip |
504 | 504 | \scale{scale-linear.pdf}{\textbf{linear}}{any values} |
|
511 | 511 | % |
512 | 512 | % --- Projections ----------------------------------------------------------- |
513 | 513 | \begin{myboxed}{Projections \hfill |
514 | | - \API{https://matplotlib.org/api/projections_api.html}} |
| 514 | + \API{https://matplotlib.org/stable/api/projections_api.html}} |
515 | 515 | {\ttfamily \textbf{subplot}(…,projection=p)} |
516 | 516 | \smallskip |
517 | 517 | \scale{projection-polar.pdf}{p='polar'}{} |
518 | 518 | \scale{projection-3d.pdf}{p='3d'}{} |
519 | | -% {https://matplotlib.org/api/projections_api.html} |
| 519 | +% {https://matplotlib.org/stable/api/projections_api.html} |
520 | 520 | % {} |
521 | 521 | % {} |
522 | 522 | %% \plot{projection-3d.pdf}{p='3d'} |
523 | | - %% {https://matplotlib.org/api/toolkits/mplot3d.html} |
| 523 | + %% {https://matplotlib.org/stable/api/toolkits/mplot3d.html} |
524 | 524 | %% {} |
525 | 525 | %% {} |
526 | 526 | \plot{projection-cartopy.pdf}{p=Orthographic()} |
527 | | - {https://matplotlib.org/api/toolkits/mplot3d.html} |
| 527 | + {https://matplotlib.org/stable/api/toolkits/mplot3d.html} |
528 | 528 | {from cartopy.crs import Cartographic} |
529 | 529 | {} |
530 | 530 | \end{myboxed} |
|
541 | 541 | % |
542 | 542 | % --- Markers --------------------------------------------------------------- |
543 | 543 | \begin{myboxed}{Markers \hfill |
544 | | - \API{https://matplotlib.org/api/markers_api.html}} |
| 544 | + \API{https://matplotlib.org/stable/api/markers_api.html}} |
545 | 545 | \includegraphics[width=\columnwidth]{markers.pdf} |
546 | 546 | \end{myboxed} |
547 | 547 | % |
|
591 | 591 |
|
592 | 592 | % --- Ticks locators -------------------------------------------------------- |
593 | 593 | \begin{myboxed}{Tick locators \hfill |
594 | | - \API{https://matplotlib.org/api/ticker_api.html}} |
| 594 | + \API{https://matplotlib.org/stable/api/ticker_api.html}} |
595 | 595 | {\tiny \ttfamily |
596 | 596 | from matplotlib import ticker\\ |
597 | 597 | ax.[xy]axis.set\_[minor|major]\_locator(\textbf{locator})\par |
|
603 | 603 | \vspace{\fill} |
604 | 604 | % |
605 | 605 | \begin{myboxed}{Tick formatters \hfill |
606 | | - \API{https://matplotlib.org/api/ticker_api.html}} |
| 606 | + \API{https://matplotlib.org/stable/api/ticker_api.html}} |
607 | 607 | {\tiny \ttfamily |
608 | 608 | from matplotlib import ticker\\ |
609 | 609 | ax.[xy]axis.set\_[minor|major]\_formatter(\textbf{formatter})\par |
|
616 | 616 | % |
617 | 617 | \begin{myboxed}{Ornaments} |
618 | 618 | {\ttfamily ax.\textbf{legend}(…) \hfill |
619 | | - \api{https://matplotlib.org/api/_as_gen/matplotlib.pyplot.legend.html}}\\ |
| 619 | + \api{https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.legend.html}}\\ |
620 | 620 | handles, labels, loc, title, frameon\smallskip\\ |
621 | 621 | \includegraphics[width=0.9\columnwidth]{legend.pdf} |
622 | 622 | \medskip\\ |
623 | 623 | % |
624 | 624 | {\ttfamily ax.\textbf{colorbar}(…)} \hfill |
625 | | - \api{https://matplotlib.org/api/_as_gen/matplotlib.pyplot.colorbar.html}\\ |
| 625 | + \api{https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.colorbar.html}\\ |
626 | 626 | mappable, ax, cax, orientation \smallskip\\ |
627 | 627 | \includegraphics[width=\columnwidth]{colorbar.pdf}\\ |
628 | 628 | \medskip\\ |
629 | 629 | % |
630 | 630 | {\ttfamily ax.\textbf{annotate}(…)} \hfill |
631 | | - \api{https://matplotlib.org/api/_as_gen/matplotlib.pyplot.annotate.html}\\ |
| 631 | + \api{https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.annotate.html}\\ |
632 | 632 | \mandatory{text}, |
633 | 633 | \mandatory{xy}, |
634 | 634 | \mandatory{xytext}, |
|
658 | 658 | % \vspace{\fill} |
659 | 659 | % |
660 | 660 | \begin{myboxed}{Animation \hfill |
661 | | - \API{https://matplotlib.org/api/animation_api.html}} |
| 661 | + \API{https://matplotlib.org/stable/api/animation_api.html}} |
662 | 662 | {\ttfamily \scriptsize |
663 | 663 | import matplotlib.animation as mpla\par |
664 | 664 | ~\par |
|
771 | 771 |
|
772 | 772 | \begin{multicols*}{5} |
773 | 773 | \begin{myboxed}{Axes adjustments\hfill |
774 | | - \API{https://matplotlib.org/api/_as_gen/matplotlib.pyplot.subplots_adjust.html}} |
| 774 | + \API{https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.subplots_adjust.html}} |
775 | 775 | plt.\textbf{subplots\_adjust}( … )\\ |
776 | 776 |
|
777 | 777 | \includegraphics[width=\columnwidth]{adjustments.pdf} |
|
899 | 899 |
|
900 | 900 |
|
901 | 901 | \begin{myboxed}{Color names \hfill |
902 | | - \API{https://matplotlib.org/api/colors_api.html} } |
| 902 | + \API{https://matplotlib.org/stable/api/colors_api.html} } |
903 | 903 | \includegraphics[width=\columnwidth]{colornames.pdf} |
904 | 904 | \end{myboxed} |
905 | 905 | % |
|
0 commit comments