All Questions
Tagged with visualization matplotlib
1,796
questions
-2
votes
0
answers
49
views
How to make colorful line legend?
I have this plot:
Where:
Orange vertical line is false positive of p-wave class
Green vertical line is false positive of qrs-wave class
Purple vertical line is false positive of t-wave class
Red ...
0
votes
1
answer
33
views
plot many signals together in python
I am trying to plot many signals (196) from a multielectrode dataset (https://zenodo.org/records/1411883). I want to plot something cool to see all registers together. I want to get something similar ...
0
votes
1
answer
31
views
Adding percentage annotations to a graph using python
Ting to add some percentage annotations to a population pyramid, but currently the percentages are duplicated, cannot, for the life of me figure out how to fix it.
#creating a count of each male in ...
0
votes
1
answer
42
views
Plotting multivariable plot in seaborn using Pandas DataFrame
Reproducing the data frame as showed :
dx = {'SEGM':[9, 8, 7, 6, 5, 4, 3, 2, 1, 0],
'YES':[4812, 2697, 2677, 1811, 1570, 1010, 418, 210, 115, 166],
'NO':[590, 1368, 2611, 2968, 3942, 3596, 2141, 1668, ...
0
votes
3
answers
58
views
How to set matplotlib spacing when using xlim. Or is it possible to use margins() with xlim()?
Per default, matplotlib always adds whitespace between your first data points and the axis like you can see in the image:
Default Plot with whitespace between data and axis. The following Code was ...
0
votes
1
answer
53
views
How to create a plot in Matplotlib that looks like a swarmplot but with overlapping points?
I'm trying to create a (sort of) swarmplot - that it- should clearly show the shapes of the distributions but allow for quick plotting of tens of thousands of datapoints by overlapping the dot ...
1
vote
1
answer
57
views
How to create an animated 2D histogram chart in python
I have the code to create my 2D histogram as below. It works for creating a statics chart but I need to create an animated heatmap which change with 'minute_play' column. How can I do that? The ...
0
votes
1
answer
59
views
_cext module not found when importing matplotlib
While importing matplotlib, I am getting an error like:
ImportError: DLL load failed while importing _cext: The specified module could not be found.
I get this error with python 3.10, 3.11, and 3.12
...
0
votes
0
answers
27
views
Error with the label plotting with seaborn.objects
I am having problems when I want to make a graph about public transport in Argentina, the label is displayed on the graph, what can I do to fix it?
fig, ax = plt.subplots()
ax.xaxis.set_tick_params(...
0
votes
1
answer
61
views
Plot line with varying thickness (z coordinate data) [duplicate]
I have a dataset with x, y and z data. I want to visualize it in a way to show z height variance as well using matplotlib.
PS: I'm trying to visualize racing tracks for analysis
This is my current ...
0
votes
0
answers
26
views
Generating PDF heatmaps in Matplotlib without artifacts
When using pcolormesh in Matplotlib to generate a heatmap (an MWE which generates the images in this post can be found at this gist, and I've put the code down below), some PDF viewers show a white ...
0
votes
1
answer
79
views
How to create a "Split-Bars" plot in Python with matplotlib? [closed]
In the datawrapper.de visualizations service a "Split-Bars" plot is available; and I would like to recreate that visualization plot type (programmatically) in Python using matplotlib (or ...
1
vote
1
answer
112
views
Multiple drag and drop rectangular selections on a Matplotlib heatmap / imshow
On a Matplotlib heatmap:
import matplotlib.pyplot as plt
import numpy as np
plt.imshow(np.random.random((16, 16)), cmap='jet', interpolation='nearest')
plt.show()
is there a built-in Matplotlib ...
1
vote
0
answers
53
views
Saving figure in matplotlib
I have created a figure using matplotlib. Im using the following lines of code to save the figure in pdf format:
fig.tight_layout()
plt.savefig("my plot.pdf", format="pdf", ...
1
vote
1
answer
73
views
Issues with Feature Importance Plots Generated by SHAP in Python
I have been using the SHAP library in Python to visualize feature importance for a machine learning model. Here's a snippet of the code I've been using:
explainer = shap.TreeExplainer(...