New answers tagged matplotlib
Score of 1
1
vote
Accepted
matplotlib savefig silently exits with code 1 after plt.plot() succeeds — no exception, no output
The issue is that you did not run conda activate bo-xgb before running ~/.conda/envs/bo-xgb/python.exe, so the environment variables like PATH was not populated by Conda, causing the Python process to ...
Score of 1
1
vote
matplotlib savefig silently exits with code 1 after plt.plot() succeeds — no exception, no output
the problem is one of these two things:
problem in environment management by confusing between numpy 1 and numpy 2 version which makes matplotlib having issue with it. you have two solutions i think:
...
Score of 1
1
vote
How to draw a radial axis in polar coordinate with matplotlib?
Here is what I have so far:
#!/usr/bin/env python
import copy
import numpy as np
import os, sys
import matplotlib
matplotlib.use('Agg')
matplotlib.rcParams['text.latex.preamble'] = r'\usepackage{...
Score of -1
-1
votes
Trying to Change A Pixel in Python
I want to emphasize something that @furas touched on in their answer.
When you see Python's assignment operator, =, don't think of it as an "equals" sign. The statement, a=b should be read ...
Score of 0
0
votes
Unable to import matplotlib pyplot
hope you're doing good.
If you want to just use pyplot, do this.
Use pip to manage packages
pip install matplotlib
Next the way you import is much outdated nowadays, even though it's correct.
It ...
Score of 6
6
votes
Trying to Change A Pixel in Python
You have to do it directly in array imgRGB[242,71] = (255, 0, 0)
Because you copy value from array to variable aCertainPixel = imgRGB[242,71]
(it doesn't create reference to this pixel in array)
and ...
Score of 1
1
vote
How to draw a line outside of an axis in matplotlib (in figure coordinates)
Late to the party, but from the answer by Eric_Firing1 on the matplotlib website:
"You can turn off the clipping to the axes box on a per-artist basis. Something like this:"
import ...
Score of 1
1
vote
Accepted
How do I use any of my system fonts in matplotlib GLOBALLY in the most straight-forward way possible?
This bloody thing took away like 6 hours of my life consulting with 2 different LLMs, and this is finally what works for me to update the Matplotlib cache with Windows 11 system fonts for MINGW64 (...
Score of 1
1
vote
Matplotlib: zorder in 3d projection not working
For some reason, 3d graphs in matplotlib don't natively support assigned zorder and automatically calculate it instead. To disable that, use:
ax = fig.add_subplot(projection= '3d', computed_zorder=...
Top 50 recent answers are included
Related Tags
matplotlib × 72763python × 62849
pandas × 11596
plot × 7938
numpy × 6664
python-3.x × 6296
seaborn × 5492
visualization × 1802
python-2.7 × 1785
dataframe × 1716
jupyter-notebook × 1508
graph × 1487
scatter-plot × 1412
subplot × 1371
animation × 1300
histogram × 1286
scipy × 1284
tkinter × 1261
bar-chart × 1238
legend × 1036
colorbar × 867
datetime × 724
axis × 697
matplotlib-basemap × 692
colors × 688