About 3,200,000 results
Open links in new tab
  1. python - How to get rid of the line connecting the points when loop ...

    Jan 17, 2019 · By default plot() plots a blue line connecting your data points, so you can try to specify what you want the function to do. try something on the line of plot(x,y, linestyle = "", marker = "o") this should replace the line with dots hopefully getting rid of the line, without breaking the loop.

  2. How to avoid line color repetition in matplotlib.pyplot?

    May 27, 2014 · You can specify your color in many ways (see http://matplotlib.sourceforge.net/api/colors_api.html). For example, you can specify the color using an html hex string: pyplot.plot(x, y, color='#112233')

  3. How to avoid multiple plots using matplotlib pause function

    Dec 28, 2022 · To avoid the generation of multiple figures you can use plt.subplots. fig, ax = plt.subplots() for i in range(3): ax.scatter(x=random.randint(0,10),y= random.randint(0,10)) If you want to create some animated figure use matplotlib.animation.FuncAnimation , as in the answer of the following topic.

  4. How to prevent FuncAnimation looping a single time after save

    Nov 24, 2020 · I’ve tried to accomplish this using FuncAnimation but even with repeat=False the animation always plays in a loop exactly once after anim.save finishes. Is there any way to prevent this?

  5. Line chart in Matplotlib – Python | GeeksforGeeks

    Aug 13, 2024 · Line charts are used to represent the relation between two data X and Y on a different axis. In this article, we will learn about line charts and matplotlib simple line plots in Python. Here, we will see some of the examples of a line chart in Python using Matplotlib:

  6. Pause and resume an animation — Matplotlib 3.10.1 …

    using the Animation.pause () method to pause an animation. using the Animation.resume () method to resume an animation. This example exercises the interactive capabilities of Matplotlib, and this will not appear in the static documentation. …

  7. Getting a plot to update within a loop without using FuncAnimation

    Jan 19, 2025 · I have seen how imshow() can be used to set_data and update it but all my attempts to set_data on the line returned by ax.plot has failed. Is there a way to do it the way I am looking for? Or is FuncAnimation the only way.

  8. prevent line breaks in legends - matplotlib-users - Matplotlib

    Sep 30, 2005 · I'm looping over a list like this ['name',[data_array],'name2',[data_array2],...] like this: for x,y in zip(toplot_list,linestyles): if type(x) == type(array([])): pylab.plot(wavelengths,x,'k%s'% y) pylab.legend(toplot_list[toplot_list.index(x)-1])

  9. How to avoid overplotting with python - The Python Graph

    Overplotting is one of the most common problems in data visualization. When your dataset is big, points of your scatterplot tend to overlap, and your graphic becomes unreadable. This problem is illustrated by a scatterplot, using matplotlib (you can see the code below).

  10. How to disable the line connecting start and end points in Matplotlib?

    Jun 7, 2020 · But my graph is for some reason connecting the start and end points with an additional line. I would like to disable that... How can I do it? The image below shows my issue. Here's my code: # Add the data of the dates and the respective screen time into 2 separate lists. date_time = item.get('title') + ' 2020' screen_time = item.get('screen_time')

  11. Some results have been removed
Refresh