Skip to content
Advertisement

Tag: matplotlib

Add datashader image to matplotlib subplots

Is it possible to add a datashader image to a set of matplotlib subplots? As a concrete example, Where I have a two by two array of matplotlib subplots and would like to replace the [0,0] plot ax_r[0] in the above example with the datashader image a. Is this possible, and if so, how? Thanks! Answer Update [January 2021] Datashader

How to put all legend entries on one line?

I can’t seem to find a solution. I have a legend that’s custom (using solution found here) and I’m trying to put multiple entries on one line rather than have each new entry under the previous one. How does one do? I’d like to have “(red marker) The red data, (blue marker) The blue data, etc…” all in one line

How to automatically annotate maximum value in pyplot

I’m trying to figure out how I can automatically annotate the maximum value in a figure window. I know you can do this by manually entering in x,y coordinates to annotate whatever point you want using the .annotate() method, but I want the annotation to be automatic, or to find the maximum point by itself. Here’s my code so far:

Importing matplotlib.pyplot in atom editor

I am using pyzo to run my python scripts. However I felt the need to switch over to the Atom code editor. I can run my python scripts without any problem. At one point I need to use the library matplotlib. In pyzo I would do: But it doesn’t work in Atom Error message: Traceback (most recent call last): File

How to update a histogram when a slider is used?

I want to build a histogram for the normal distribution and update the plot when the mean, standard deviation and sample size are changed; analogue to the post here. However, I struggle with the update function. In the example above and are used but how would this have to be changed when a histogram is plotted? So, I am not

Get default line colour cycle

I noticed when you plot that the first line is blue, then orange, then green, and so on. Is there some way to access this list of colours? I’ve seen a million posts on how to change the colour cycle or access the iterator, but not on how to just get the list of colours that matplotlib cycles through by

Advertisement