About 306,000 results
Open links in new tab
  1. Pyplot tutorial — Matplotlib 3.10.3 documentation

    matplotlib.pyplot is a collection of functions that make matplotlib work like MATLAB. Each pyplot function makes some change to a figure: e.g., creates a figure, creates a plotting area in a …

  2. Plot a Function Defined with def in Python Matplotlib

    To plot a function defined with def in Python, we can take the following steps ? Set the figure size and adjust the padding between and around the subplots. Create a user-defined function …

  3. python 2.7 - How to plot a function defined with def ... - Stack Overflow

    import numpy as np import matplotlib.pyplot as plt rr = np.arange(-5, 15, 2) def y(o): return np.sin(o / 2.) * np.exp(o / 4.) + 6. * np.exp(-o / 4.) plt.plot(rr, y(rr).astype(np.int)) plt.show() Share

  4. 5 Creative Ways to Plot a Function Defined with def in Python Matplotlib

    Mar 6, 2024 · This article will explore how a Python function – defined using the def statement – can be plotted using the Matplotlib library, taking the reader from input (the function definition) …

  5. Simple Plot in Python using Matplotlib - GeeksforGeeks

    May 10, 2025 · Matplotlib is one of the most popular plotting libraries in Python which makes it easy to generate high-quality graphs with just a few lines of code. In this article, we'll see how …

    Missing:

    • Def

    Must include:

  6. How to Plot a Function in Python with Matplotlib - datagy

    Mar 21, 2023 · With Matplotlib, we can plot the function, add a title and legend, and customize the appearance of the graph. Seaborn provides similar capabilities for plotting functions with more …

  7. Matplotlib Plotting - W3Schools

    By default, the plot() function draws a line from point to point. The function takes parameters for specifying points in the diagram. Parameter 1 is an array containing the points on the x-axis. …

  8. Python Plotting With Matplotlib (Guide) – Real Python

    Using one-liners to generate basic plots in matplotlib is fairly simple, but skillfully commanding the remaining 98% of the library can be daunting. This article is a beginner-to-intermediate-level …

  9. Is it possible to plot within user-defined function with python

    Jun 17, 2013 · What I want to do is define a function which contain plotting sentences. Like this: import matplotlib.pyplot as plt def myfun(args, ax): #...do some calculation with args ax.plot(...) …

  10. matplotlib.pyplot.plotMatplotlib 3.10.3 documentation

    matplotlib.pyplot.plot# matplotlib.pyplot. plot (* args, scalex = True, scaley = True, data = None, ** kwargs) [source] # Plot y versus x as lines and/or markers. Call signatures:

  11. Some results have been removed
Refresh