matplotlib Questions

4

Solved

I am trying to automatically update a scatter plot. The source of my X and Y values is external, and the data is pushed automatically into my code in a non-predicted time intervals (rounds). I ha...
Chisholm asked 10/3, 2017 at 16:1

4

Solved

I want to plot variables that belongs to certain groups. Say that I have 6 variables that I want to sort into these 3 groups and plot like a venn diagram. I would like to annotate the variable nam...
Posset asked 7/11, 2013 at 16:38

3

Solved

Here is the histogram To generate this plot, I did: bins = np.array([0.03, 0.3, 2, 100]) plt.hist(m, bins = bins, weights=np.zeros_like(m) + 1. / m.size) However, as you noticed, I want to plo...
Calices asked 3/11, 2015 at 11:6

4

Solved

When I plot something with contourf, I see at the bottom of the plot window the current x and y values under the mouse cursor. Is there a way to see also the z value? Here an example contourf: im...
Blairblaire asked 9/4, 2012 at 23:21

2

Solved

Trying to make the pie larger. Looking at the docs, and other places, it says to set the radius. It seems no matter which value I put in the radius there's no increase. I'm posting the full code an...
Carminecarmita asked 9/3, 2018 at 17:32

3

Solved

I would like to obtain something similar to this: using the python library networkx. I can generate a similar directed graph using the following code: import matplotlib.pyplot as plt import net...
Measure asked 24/4, 2020 at 15:50

3

I want to draw a rectangle, with a gradient color fill from left to right, at an arbitrary position with arbitrary dimensions in my axes instance (ax1) coordinate system. My first thought was t...
Rupert asked 26/7, 2014 at 23:33

6

Solved

As it's usually advised, I have managed to reduce my problem to a minimal reproducible example: import numpy as np import seaborn as sns import matplotlib.pyplot as plt matrix = np.array([[0.1234,...
Mercantilism asked 23/9, 2023 at 22:19

4

I use a suite of python 3.7 code for my work, generating various plots and fitting lines. It works perfectly fine on my old windows 10 machine. However, I just got a new laptop and installed 3.12 o...
Twitty asked 30/5, 2024 at 21:29

3

Solved

I am working with the FacetGrid example presented here that results in the plot below. In my data set, there is quite a lot of plots, and it would be convenient to have the x axis labels repeated f...
Eucaine asked 5/9, 2018 at 9:58

3

Trying to use Matplotlib on Linux, but I keep getting this error: ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running I am ...
Proverbs asked 17/4, 2019 at 16:12

4

Solved

I created a script that reads and plots .txt files and their content (numbers/values). Each .txt file is located in a different folder. Each folder, in turn, represents one subject from which the d...
Hashimoto asked 28/11, 2021 at 11:29

4

Solved

I m trying to plot simultaneously a plane and some points in 3D with Matplotlib. I have no errors just the point will not appear. I can plot at different times some points and planes but never at s...
Hibernate asked 17/3, 2016 at 12:44

5

Solved

I try to generate a movie using the matplotlib movie writer. If I do that, I always get a white margin around the video. Has anyone an idea how to remove that margin? Adjusted example from http:/...
Adigun asked 8/4, 2013 at 14:56

6

Solved

I want to be able to ascertain the provenance of the figures I create using matplotlib, i.e. to know which version of my code and data created these figures. (See this essay for more on provenance....
Underpass asked 10/5, 2012 at 11:0

10

Solved

I'm plotting two datasets with different units on the y-axis. Is there a way to make the ticks and gridlines aligned on both y-axes? The first image shows what I get, and the second image shows wh...
Tuppeny asked 5/11, 2014 at 8:18

3

Solved

I was wondering how is the "best" way to type-hint the axis-object of matplotlib-subplots. running from matplotlib import pyplot as plt f, ax = plt.subplots() print(type(ax)) returns &l...
Meilen asked 7/9, 2020 at 19:20

3

I am trying to update my matplotlib in virtualenv and now it seems everything crashed :( what I did till now is basically, source ~/myenv/bin/activate pip install -U matplotlib I had previously...
Procurance asked 1/12, 2017 at 14:3

3

As far as I can tell, I don't even need pytz for what I'm doing. I'm re-learning python for image processing using the O'Reilly book 'Programming Computer Vision with Python' for work (and I'm als...
Abba asked 14/10, 2014 at 10:52

4

Solved

Consider my series as below: First column is article_id and the second column is frequency count. article_id 1 39 2 49 3 187 4 159 5 158 ... 16947 14 16948 7 16976 2 16977 1 16978 1 1...
Chatter asked 29/5, 2016 at 20:32

4

For an algorithm I am using contour, but I'm only interested in its collection of paths. Since I have called pylab inline from the start, and it is now too painful to rewrite the code without t...
Unideaed asked 21/5, 2015 at 14:36

2

After adding bbox_inches="tight" to an invocation of plt.savefig that has worked for several years, I get /usr/local/lib/python2.7/site-packages/matplotlib/figure.py:1744: UserWarning: ...
Lasseter asked 14/2, 2016 at 16:4

4

Solved

I have a 3d plot of lines generated by matplotlib. I want to overlay an image at a specific xy (or yz, xz) slice. How do I do that using python? Thanks. I have a simple 3d plot code as: fig = plt...
Whitebook asked 26/11, 2012 at 17:46

2

Solved

How do I set a consistent colorscheme for three axes in the same figure? The following should be a wholly reproducible example to run the code and get the same figure I have posted below. Get the...
Matadi asked 20/6, 2019 at 16:43

4

Solved

How can I make a clockwise polar plot? Somebody ask a similar question here: How to make the angles in a matplotlib polar plot go clockwise with 0° at the top?, But I don't understand this: im...
Benedictbenedicta asked 5/10, 2011 at 15:54

© 2022 - 2025 — McMap. All rights reserved.