All Questions
Tagged with python matplotlib
62,577
questions
0
votes
0
answers
5
views
How can I move two items on a plot independently of each other?
I am making an image in python where I plot random points and use them to create 2 blobs. I then put a bounding box around them and scale them to be a target area. I then add a jitter to the 4 corners ...
0
votes
1
answer
12
views
Can not iterate "cbar" or "cmins" in multiple violinplot in a single plot
I am trying to change colors of each violinplot in multiple plots in a single plot. I can change colors of the bodies, but I can not change the colors for cbars, cmins, cmaxes. How do I do this?
...
0
votes
0
answers
11
views
Python matplotlib - draw rectangles with small inner padding (in pixels) that adjust automatically when zooming
I need to draw rectangles with small amount of INNER padding (e.g. 2 px) so that they don't come in contact with immediately adjacent rectangles. I would like the padding to remain constant after any ...
2
votes
1
answer
30
views
Adding a flag to the end of a bar chart in python
I was trying to follow an example outlined here https://stackoverflow.com/a/61973946
The code, after small adjustments looks like this:
def pos_image(x, y, pays, haut):
pays = countries.get(pays)....
0
votes
0
answers
19
views
How to fix my Python Flet Audio Visualizer that is not working without an error in the terminal
Title: Audio Plays but Spectrum Visualization Not Showing in Flet Audio Visualizer.
I am working on an Audio Visualizer using the Flet framework. The sound plays correctly, but the spectrum ...
0
votes
1
answer
28
views
Plotting a function that is a string in matplotlib // interpreting a str as python code?
I am creating an RPN calculator that tries to plot the function given by a user. For example, if a user inputs "x sin 3 * plot" I would expect it to plot sin(x)*3. The code for this is below....
0
votes
0
answers
18
views
Matplotlib Plot Not Responding in VSCode Debug Mode
I'm encountering an issue when trying to plot a simple graph using Matplotlib in Python while in debug mode in VSCode. The plot works perfectly in normal execution mode, but when I set a breakpoint ...
0
votes
2
answers
54
views
How to remove large space between rows in matplotlib plot?
Code:
fig, axes = plt.subplots(2, 6)
for row in axes:
for ax in row:
## Set limits
ax.set_xlim(-1, 1)
ax.set_ylim(-1, 1)
## Set aspect ratio
ax.axis('...
0
votes
1
answer
28
views
Remove blank area of matplotlib between distance of zero for multivariate time series
I have two time series:
First row is prediction
second row is ground truth
I want remove this red area, where it should be flexible.
I mean there is no distance between them like this picture, ...
1
vote
0
answers
47
views
How to apply stippling to contourf plots in Python?
I want to add stippling to Xarray DataArray data to indicate significance. The data is 2D climate data on a lat lon grid. I want to give a True/False mask to plot over mapped variable data. I am ...
0
votes
1
answer
21
views
How to control color bar secondary y axis ticks
I've got a colorbar displaying the log of probability for some data. I want a 2nd set of ticks for the colorbar that displays "raw" probability values. I have this working somewhat, but I ...
0
votes
0
answers
24
views
Plotting a bar graph using seaborn with hue, how to get bar labels as percentage values [duplicate]
I have the following data set(df):
source_city class price
0 Bangalore Business 53671.856898
1 Bangalore Economy 6526.294410
2 Chennai Business 54036.749819
3 ...
0
votes
0
answers
19
views
How to set thresholds on colorbar in matplotlib imshow plot?
I am trying to duplicate the following color bar with matplotlib. It is shown to the right of an image. Originally this color bar was produced in Matlab. However I think that I can define another axis ...
0
votes
1
answer
25
views
How to project a contour map on the xy plane using matplotlib?
How can I plot a contour map on the xy plane rather than on the 3d surface of the function?
I wanted to plot the contour where z = 0.
However, my currently output is producing this:
The following ...
0
votes
1
answer
29
views
PyPlot plots are bigger with high DPI, but still blurry
I am following a tutorial to generate a scatter plot of points, coloured by cluster and also colour-saturated based each point's strength of membership in its respective clusters. I mention the ...