Skip to main content

Questions tagged [matplotlib]

Matplotlib is a plotting library for Python which may be used interactively or embedded in stand-alone GUIs. Its compact "pyplot" interface is similar to the plotting functions of MATLAB®.

Filter by
Sorted by
Tagged with
2 votes
1 answer
59 views

To clarify this is a homework help question. I have started it already and I am running up against a brick wall when it comes to coding it. We are to use what I said above to generate a sine wave ...
Jassen Buerano's user avatar
Advice
0 votes
3 replies
22 views

I am trying to plot the time evolution of the function y(x, t) on a 2-D plot in matplotlib where t represents time and x one spatial dimension. I have y and x parameterized as functions of a parameter ...
Thanos's user avatar
  • 101
1 vote
1 answer
59 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
7 votes
1 answer
111 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 ...
Daniele C.'s user avatar
0 votes
1 answer
56 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
2 votes
1 answer
84 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
83 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
34 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
-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
52 views

I am trying to plot some data from a Markov Chain Monte Carlo run, using getDist, which (I assume) uses matplotlib under the ...
kalle's user avatar
  • 207
Best practices
2 votes
4 replies
59 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 ...
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: ...
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: ...
user3236841's user avatar
  • 1,406
1 vote
1 answer
119 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 ...
Brandon's user avatar
  • 546
1 vote
1 answer
52 views

I'm making a protein secondary structure plot, at first with trivial data: ...
con's user avatar
  • 6,247
0 votes
1 answer
75 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 ...
egaznep's user avatar
  • 33
2 votes
1 answer
117 views

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

A synopsis of my code. ...
snow6oy's user avatar
  • 715
0 votes
1 answer
58 views

I made a "gauge" image using the following code: ...
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')), ...
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 ...
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: ...
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: ...
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 ...
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 ...
Paul Jurczak's user avatar
  • 8,662
3 votes
1 answer
84 views

This Python 3.13 script with Matplotlib 3.10.3 run on 1200x1600 display: ...
Paul Jurczak's user avatar
  • 8,662
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. ...
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 <...
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
51 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
66 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
112 views

I use a swarmplot to display vertically multiple distributions in the same graphic: ...
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
0 votes
1 answer
141 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 ...
chaz2431's user avatar
Advice
0 votes
3 replies
124 views

This is the program I am using: ...
Andrew's user avatar
  • 1,226
1 vote
0 answers
168 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 ...
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 ...
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 ...
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
114 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: ...
RayX500's user avatar
  • 319

1
2 3 4 5
1456