About 161,000 results
Open links in new tab
  1. matplotlib.pyplot.marginsMatplotlib 3.10.1 documentation

    matplotlib.pyplot.margins# matplotlib.pyplot. margins (* margins, x = None, y = None, tight = True) [source] # Set or retrieve margins around the data for autoscaling axis limits. This allows to configure the padding around the data without having to set explicit limits using set_xlim / …

  2. Reduce left and right margins in matplotlib plot

    Oct 28, 2010 · import matplotlib.pyplot as plt plt.plot(whatever) plt.subplots_adjust(left=0.1, right=0.9, top=0.9, bottom=0.1) This will work for both the figure on screen and saved to a file, and it is the right function to call even if you don't have multiple plots on the one figure.

  3. Matplotlib.pyplot.margins () function in Python - GeeksforGeeks

    Jan 3, 2021 · Matplotlib.pyplot.margins () is a function used to set the margins of the x and y axes. All input parameters must be a float that too within the range [0, 1]. We cannot pass both positional and keyword arguments at once as that will raise a TypeError. The padding added to each limit of the axes is the margin times the data interval for that axis.

  4. Comprehensive Guide to Matplotlib.pyplot.margins () Function in Python

    Nov 9, 2024 · Matplotlib.pyplot.margins() function in Python is a powerful tool for adjusting the margins of plots created using Matplotlib. This function allows you to control the amount of padding between the data points and the edges of the plot.

  5. Modifying Figure Margins in Python 3 - DNMTechs

    To modify the figure margins in Python 3, you can use the subplots_adjust() function from the matplotlib.pyplot module. This function allows you to adjust the margins of the figure by specifying the amount of padding in the form of a fraction of the figure width or height.

  6. Matplotlib Margins - The Python Graph Gallery

    This post shows how to change margins in a matplotlib chart using the subplots_adjust() function.

  7. Subplots spacings and margins — Matplotlib 3.10.1 …

    Adjusting the spacing of margins and subplots using pyplot.subplots_adjust. There is also a tool window to adjust the margins and spacings of displayed figures interactively. It can be opened via the toolbar or by calling pyplot.subplot_tool.

  8. How can I get rid of the white space in matplotlib?

    Mar 7, 2021 · You can use either plt.margins(x=0) or ax.margins(x=0) to remove all margins on the x-axis.

  9. How do I extend the margin at the bottom of a figure in Matplotlib?

    Jan 11, 2015 · A quick one-line solution that has worked for me is to use pyplot's auto tight_layout method directly, available in Matplotlib v1.1 onwards: This can be invoked immediately before you show the plot (plt.show()), but after your manipulations on the axes (e.g. ticklabel rotations, etc).

  10. Python matplotlib.pyplot.margins() Examples - ProgramCreek.com

    The following are 30 code examples of matplotlib.pyplot.margins () . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

  11. Some results have been removed
Refresh