11,824 questions with no answers
1
vote
0
answers
115
views
Legends and handles not showing correctly in subplots
I have some figures with subplots where I compare various parameters from two tests (excel files Testdata1 and Testdata2) . Since the same two test is in all the subplots I use legend on the figure ...
8
votes
0
answers
3k
views
Specifying matplotlib scatter size in plot units
I would like to specify my scatter dot size not using points or pixels but rather using plot units. Take for instance the following:
import matplotlib.pyplot as plt
x = [0]
y = [0]
plt.scatter(x,y)
...
0
votes
0
answers
55
views
Matplotlib figsize has no visible effect in Spyder plots pane
I am using Matplotlib in Spyder and I am trying to change the figure size with figsize, but it does not seem to make any visible difference no matter what values I use.
For example, even if I change:
...
1
vote
0
answers
131
views
python trying to plot a DFA with networkx and matplotlib
Hi I was trying to implement a plot function for a DFA class, using networkx in python.
def plot(self):
G = nx.MultiDiGraph()
nodes = self.collect_nodes()
for n in nodes:
...
5
votes
0
answers
2k
views
Setting ONLY WIDTH of a figure size, without height (Python)
I want to have a figure which is limited to the given size in width but its height is not set and is free to change.
The goal here is to define a figure which has a certain width but can change its ...
2
votes
0
answers
53
views
What is wrong with my PIL looped image paste?
I have script that loops over a set of json color themes, uses seaborn and matplotlib to generate a labeled swatch and then saves it to a buffer. I want to paste the buffer into a new PIL.Image but ...
1
vote
0
answers
55
views
Preventing matplotlib ax.annotate from overflowing with WCS projection
A scatter plot with an astropy wcs projection is limited to just the xlim/ylim of the axis, even if there are points outside that range:
import numpy as np
import matplotlib.pyplot as plt
import ...
1
vote
0
answers
214
views
Jupyter notebook refusing to recognize matplotlib installation
I am running a Jupyter notebook and I had to manually install using pip Matplotlib 3.10.7 because it wasn't recognized on my Anaconda. Now when I try to get it in Jupyter I get this error:
...
3
votes
0
answers
108
views
How to plot contour onto the 'walls' of a 3D histogram Python
For the context, I want to represent spatial-temporal evolution of a heatwave event.
In this example, a heatwave is defined when the daily temperature is higher than the temperature threshold and the ...
Tooling
0
votes
0
replies
39
views
Creating custom 3D plots with annotations confined to planes
I want to create a 3d plot that only shows data and annotations in the xy, xz, and yz planes. Especially, annotations should be fixed to these planes as well, and should not rotate out of them when ...
4
votes
0
answers
88
views
How to create a class that generates auto-updateable plots
I want to create a class that will create updateable plots. I plan on having 8-16 figures in one window, so it would be nice to have a class that would initiate these for me. These graphs will auto-...
0
votes
0
answers
92
views
Rendering matplotlib figure in VSCode (Jupyter) like fig.savefig
Problem
When saving a matplotlib figure using fig.savefig(), the figure looks different from when the figure is rendered in a Jupyter Notebook.
Question
How can I render a static (non-interactive) ...
1
vote
0
answers
185
views
What does np.ones_like represent in a quiver plot of a differential equation?
I found some similar questions about quiver plots and direction fields, but I’m still confused about the meaning of these two lines in many examples:
What do dx = np.ones_like(f) and dy = f mean in a ...
0
votes
0
answers
96
views
Coarsening the resolution of a xarray dataset
Very new to python! I am trying to model bottom water temperatures over time and need to reduce the resolution of my model from 1/20º to 1º. My ultimate goal is to map this and select specific grid ...
0
votes
0
answers
145
views
New installation get this: main loop could not convert string '2023-01-02' to float64
I have just installed the new Mint 22.2 as my old hard disk with Mint 21 seems to have some issues. I use Eric-IDE to execute my .py script.
The script is first downloading stock values from a certain ...