Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
50 views

I am trying to create an animation of two plots side by side on which on the first plot I display a series of images and on the second plot a log log representation of data corresponding the image ...
daniel vito's user avatar
6 votes
0 answers
77 views

I have an application in python that embeds a matplotlib.Axes3d in a QWidget to draw 3D curves. The problem is that when resizing or there is a lot of space in the window, matplotlib cuts the plot ...
Daniele C.'s user avatar
0 votes
1 answer
52 views

I'm trying to display labels in a 3D plot. My final goal is to display a tiny version of an image/texture at the coordinates of its average color in Lab space. After multiple failed attempts, I ...
herhor67's user avatar
  • 119
1 vote
1 answer
34 views

While using the following code: from matplotlib import pyplot from sarpy.visualization.remap import Density from sarpy.io.product.converter import open_product from sarpy.io.complex.converter import ...
Przemysław Bezeg's user avatar
0 votes
1 answer
68 views

I made a shapefile containing the boundaries of all the worlds countries and some of their regions (like the states in the US, Canadian provinces, etc). I've been trying to set a boundary box of my ...
Gabe Mathews's user avatar
4 votes
1 answer
82 views

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-...
Deepolisnoob's user avatar
-3 votes
0 answers
49 views

I am currently creating figures with one or more imshow plots. I would like to get a native plot of one of those imshow plots. To my understanding I would need to calculate the figure size, with ...
FordPrefect's user avatar
2 votes
1 answer
32 views

I am creating a dashboard using matplotlib. The following is my python3 code. When I minimize the matplotlib plot window, the window jumps back up and the window does not stay minimized. What should I ...
pikachu's user avatar
  • 39
-2 votes
0 answers
29 views

I have a 2D array of integer data that I am plotting with matplotlib's axes interface (not the pyplot interface). When I use ax.imshow I get the plot I am looking for. The built in colorizer handles ...
DBS4261's user avatar
  • 526
1 vote
1 answer
51 views

I am trying to plot some data from a Markov Chain Monte Carlo run, using getDist, which (I assume) uses matplotlib under the hood for plotting. There is no error message or anything, and it produces a ...
kalle's user avatar
  • 197
Best practices
2 votes
4 replies
55 views

I am performing Exploratory Data Analysis (EDA) on a medical dataset (Primary Biliary Cirrhosis) to select features for a multiclass classification model. My target variable is Stage (1, 2, 3, 4). The ...
DJTrevor Philips's user avatar
Tooling
0 votes
3 replies
47 views

What I want to achieve is something as below: I have found the brokenaxes package here, and tried it: from brokenaxes import brokenaxes import numpy as np bax = brokenaxes(xlims=((0, 10), (195, 200))...
Explorer's user avatar
  • 117
1 vote
1 answer
69 views

I am stuck after displaying using matplotlib because I can not seem to figure out what code to use to continue after using matplotlib. Specifically, I use: plt.figure(figsize=[10, 10]) plt.title(&...
user3236841's user avatar
  • 1,406
1 vote
1 answer
118 views

I'm writing a Python code that's supposed to create a graph and export it as a vector PDF file. I'm using Jupyter Lite at jupyter.org. I've successfully created the graph, but when I try to export it ...
Rain's user avatar
  • 121
1 vote
2 answers
88 views

Why does matplotlib round to the nearest month sometimes and not other times depending on the order lines are plotted and which dates are used. ax3 and ax4 are particularly interesting because they ...
Brandon's user avatar
  • 546
1 vote
1 answer
52 views

I'm making a protein secondary structure plot, at first with trivial data: import matplotlib.pyplot as plt fig, ax0 = plt.subplots(1,1, layout = "constrained") from matplotlib.colors import ...
con's user avatar
  • 6,247
0 votes
1 answer
74 views

I find the coordinates shown below (in the form: (x, y) [z]) very useful for interacting with the data. Unfortunately, librosa.display.specshow does not show the value at (x, y), rather, only the ...
egaznep's user avatar
  • 33
2 votes
1 answer
111 views

I struggle with typechecks using matplotlib.pyplot.subplot_mosaic. I have create the following fuction, which generates the mosaic pattern and the per_subplot_kw: def create_mosaic(num_rows): def ...
MaKaNu's user avatar
  • 1,108
Advice
0 votes
2 replies
58 views

A synopsis of my code. import matplotlib.pyplot as plt import shapely.plotting from shapely.geometry import Polygon facing = 'north' shape = 'triangle' polygon = Polygon(((1, 17), (9, 1), (17,...
snow6oy's user avatar
  • 715
0 votes
1 answer
58 views

I made a "gauge" image using the following code: taux = 91 # Plot fig, ax = plt.subplots(figsize=(7.5,5), subplot_kw=dict(polar=True)) ax.set_theta_zero_location("W") ...
YamiOmar88's user avatar
  • 1,496
1 vote
1 answer
87 views

I've been trying to set equal data aspect ratios in matplotlib with ax.set_aspect('equal', 'datalim') (aka ax.axis('equal')), while preserving lower bounds/limits, aka anchoring one side of the data ...
casblaauw's user avatar
4 votes
1 answer
118 views

In Matplolib, it is possible to change the direction of the tick of 2D plots with tick_params parameters import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np fig ...
Thomas Bernat's user avatar
2 votes
2 answers
177 views

I have what might be a simple problem. I have a dataset that looks like this: Exp Site Hole Core Type Sect A/W ... Instrument Instrument group Text ID Test No. Sample ...
Weiss's user avatar
  • 333
1 vote
1 answer
62 views

I have a scatterplot in pyplot where the x-values are necessarily strings. Is there an easy way to limit the number of xticklabels that pyplot will show? I am not referring to specifying the xticks ...
Alex V.'s user avatar
  • 550
2 votes
1 answer
72 views

I'm doing some data visualisation for an experiment on near/far field diffraction. My goal is to essentially put several 2d plots in front of one another, pretty much identical to how this example in ...
KaasBaasKoning's user avatar
-1 votes
1 answer
74 views

SET UP I have multiple scripts that I execute with a .bat file, like so: cd C:\\path\\to\\my\\project\\directory echo Running script 1 "C:\\ProgramData\\miniforge3\\envs\\myenv\\python.exe" ...
bismo's user avatar
  • 1,655
0 votes
1 answer
101 views

I wrote a piece of Python code to read different GPS observation files (.24o) and navigation files (.24p), and generate polar plots of satellite trajectories. The goal is that the RINEX file can be ...
Aria's user avatar
  • 1
3 votes
1 answer
134 views

I am trying to display a LaTeX-style equation in a Matplotlib plot using a custom font (Algerian). I want both the equation and the surrounding text to use the same upright (non-italic) font. Using ...
taiwan12's user avatar
  • 123
2 votes
1 answer
143 views

I am working on a small project and it is my first time using matplotlib, and I am struggling with how to make my bar graph look better with more inputs. The whole idea of the program is to read text ...
AP_'s user avatar
  • 45
Advice
0 votes
2 replies
126 views

On Window function - Wikipedia tapering functions are plotted using two different styles. One shows curve (samples) and the other Fourier transform (bins). I've prepared two tapering functions based ...
Juha P's user avatar
  • 337
2 votes
1 answer
108 views

I would like to connect onTool() callback to "Reset original view" event, i.e. clicking on "home" icon in the bottom left corner of Matplotlib figure. I tried several options ...
Paul Jurczak's user avatar
  • 8,660
3 votes
1 answer
84 views

This Python 3.13 script with Matplotlib 3.10.3 run on 1200x1600 display: import matplotlib.pyplot as plt, numpy as np fig, ax = plt.subplots() plt.tight_layout(pad=0.01) fig.canvas.manager....
Paul Jurczak's user avatar
  • 8,660
3 votes
1 answer
120 views

When I run the code below, the plot in the PDF is messed up. The content of the plot and the colorbar are shifted down to the left, as shown in the attached screenshot of the PDF. import matplotlib....
felipon's user avatar
  • 27
0 votes
0 answers
77 views

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) ...
Heisenbugs's user avatar
1 vote
1 answer
66 views

I am trying to create a boxplot with different categories and overlay scatter points on top of it. The problem I am encountering is that when the results across categories are very similar, the ...
Lola Riesgo Torres's user avatar
3 votes
2 answers
113 views

I have a function that will produce a map when given a DataFrame containing lat/lon coordinates. Regardless of the shape of the track that can be drawn from coodinate pairs and timestamps, I want to ...
Cstr99's user avatar
  • 31
0 votes
1 answer
50 views

I was trying to do something for a project where I create two random 3D vectors, project them onto a 2D plane by removing their x-component, taking the dot product between the two to find their ...
Mr. L's user avatar
  • 1
0 votes
0 answers
62 views

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 ...
Alexis's user avatar
  • 1
1 vote
1 answer
111 views

I use a swarmplot to display vertically multiple distributions in the same graphic: df = polars.read_csv("...") ax = seaborn.swarmplot(data=[df["ColA"], df["ColB"], df[&...
FiReTiTi's user avatar
  • 5,979
Advice
0 votes
2 replies
121 views

I'm using python and PySide6 to build GUI desktop apps. In my code I generate a list of figures, and then pass them to my view to display each in a separate tab. Right now, I loop through the list, ...
Adrian V's user avatar
1 vote
1 answer
140 views

I'm building a multi-frame Tkinter app for a school project (NEA dashboard). One of the frames displays a Matplotlib scatter plot using FigureCanvasTkAgg. The issue is that after switching to the ...
chaz2431's user avatar
Advice
0 votes
3 replies
124 views

This is the program I am using: fig, ax = plt.subplots(figsize=(4, 4)) t, dt = np.linspace(-4, 4, 10, retstep=True) x = t y = t**3 - 9*t xy = np.stack((x, y), axis=1) n = len(xy) d1ydx1 = np....
Andrew's user avatar
  • 1,226
1 vote
0 answers
166 views

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: ...
therickster's user avatar
0 votes
0 answers
103 views

I am attempting to shrink the colorbar for my map generated with geopandas as the default one generated is too huge. I have tried using fig.colorbar(kioskplot, ax=ax, shrink=0.7) but python is giving ...
Ber K's user avatar
  • 9
2 votes
2 answers
125 views

when i try to print/plt.tile the label of an image, its printing the tensor(32,) instead of a single label value. When i tried to print before the resizing, it was printing fine. Code: #### # ...
kay_g's user avatar
  • 73
0 votes
0 answers
138 views

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 ...
Henning's user avatar
  • 27
0 votes
1 answer
66 views

I made a minimal example that crashes. For the crash it is required that the torch libraries are linked. I made sure that GLIBCXX_USE_CXX11_ABI=0 for all 3 components. Setup is Ubuntu, g++, C++17. Any ...
mzw's user avatar
  • 11
3 votes
2 answers
113 views

I have a dataframe with a mix of data types (object and numeric). I want to plot a scatter plot for all numeric columns in the dataset against specific columns: col_32, col_69,col_74 and col_80 ...
RayX500's user avatar
  • 319
1 vote
1 answer
69 views

I cannot remove the horizontal white space between a large number of subplots in matplotlib lib. How do I do this? I think the problem is that the default plots are very wide, so that even when I set ...
Finncent Price's user avatar
1 vote
0 answers
177 views

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 ...
Youness Ansarey's user avatar

1
2 3 4 5
1457