About 55,200 results
Open links in new tab
  1. python - Set markers for individual points on a line - Stack Overflow

    May 11, 2023 · import numpy as np import matplotlib.pyplot as plt xs = np.linspace(-np.pi, np.pi, 30) ys = np.sin(xs) markers_on = [12, 17, 18, 19] plt.plot(xs, ys, '-gD', markevery=markers_on, label='line with select markers') plt.legend() plt.show() This last example using the markevery kwarg is possible in since 1.4+, due to the merge of this feature ...

  2. python - unique plot marker for each plot - Stack Overflow

    I have a loop where i create some plots and I need unique marker for each plot. I think about creating function, which returns random symbol, and use it in my program in this way: for i in xrange(...

  3. How to do a scatter plot with empty circles in Python?

    So I assume you want to highlight some points that fit a certain criteria. You can use Prelude's command to do a second scatter plot of the hightlighted points with an empty circle and a first call to plot all the points. Make sure the s paramter is sufficiently small for the larger empty circles to enclose the smaller filled ones.

  4. python - Matplotlib custom marker/symbol - Stack Overflow

    Jan 15, 2013 · What I like about the matplotlib example code are the 'c="g"' which I interpret as color adjustment for the plot (don't have a python shell in the writing moment to test it). – Norfeldt Commented Jan 15, 2013 at 8:35

  5. python - How to put labels on plot markers - Stack Overflow

    May 15, 2019 · For each of the markers in the plot (*) I want to label them with text from the list_of_markers. Don't seem to find an option to pass a list of text labels to the plot anywhere, any help appreciated. Don't seem to find an option to pass a list of text labels to the plot anywhere, any help appreciated.

  6. python - How to obtain a list of all markers in matplotlib? - Stack ...

    Jan 8, 2020 · The diagrams are resulting from tests with varying parameters, hence the need to iterate over all available colors, line styles and markers, to make sure that when I have 100 lines on a diagram, I can distinguish the ones that belong to exploded solutions (values like 1e15 on this plot). How can I put all markers in matplotib in a list and ...

  7. python - pyplot scatter plot marker size - Stack Overflow

    For a more concrete example, in the following figure, the same marker size (s=36) was passed to seaborn, matplotlib and pandas scatter-plot plotters but because the default edge color and marker edge width in seaborn are different from those in the other two methods, the scatter plots end up with markers of different sizes.

  8. python - How to customize marker colors and shapes in scatter …

    Dec 7, 2017 · I understand you have seven categories, each with some set of (x,y,c) where x,y are coordinates in the plane and c is 0 or 1 Then you wanted different colors and markers for each category. Or do you want different markers for each category and different colors for each c? –

  9. python - How to make a colored markers legend from scratch

    Nov 20, 2017 · in matplotlib, "markers" are just things that are used in the plt.plot or plt.scatter functions. plt.plot creates Line2D objects, plt.scatter creates PathCollection objects. If you want markers in your legend, you essentially have to use one of those two objects. I find Line2D the easier to work with for this case. It's not a "trick", just one ...

  10. python - Remove line through legend marker with .plot - Stack …

    I have a matplotlib plot generated with the following code: import matplotlib.pyplot as pyplot Fig, ax ...

Refresh