Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
0 votes
0 answers
9 views

Plotting related multiple plots sharing an axis but each disjoint from each other

I want to plot related multiple plots sharing an axis but each disjoint from each other, i.e., same x-axis feature and scale but each of the other features has their own separate y-axis region with it'...
Snape's user avatar
  • 1
0 votes
0 answers
32 views

Why do seaborn.histplot and pyplot.hist generate two different histograms on the same data?

I'm trying to visualize a customer data, two of the variables I'm looking at are verified_status and video_transcription_length. ...
user161913's user avatar
0 votes
0 answers
28 views

Extracting the lines and arrows from matplotlib streamplot() (issues with scaling)

My goal is to extract the coordinates of lines and arrows produced by plt.streamplot(), since I want to reuse them elsewhere. plt.streamplot() generates lines and arrows as objects of type ...
James's user avatar
  • 133
0 votes
0 answers
12 views

Need to print kNN K's together with NNF / STFT covariance matrix

Challenge on printing print kNN K's together with NNF / STFT covariance matrix Effort works for summary covariance but need solution to print print kNN K's together with NNF / STFT covariance matrix ...
Data Science Analytics Manager's user avatar
0 votes
0 answers
39 views

Quantifying heat map data

I have heatmap data (the x and y axis take in angles as inputs, and the color of that particular spot on the grid represents the "divergence.") I am unsure on how to numerically describe my ...
MaximeJaccon's user avatar
0 votes
1 answer
52 views

Seaborn distplot and countplot displaying incorrect y-axis

I have a simple dataset created using NLTK's FreqDist function, and have successfully converted the distribution to a pandas dataframe. When visualizing that dataframe using seaborn, I get a weird ...
NotHead's user avatar
0 votes
0 answers
25 views

Can't show images outputted by a VAE with pyplot.imshow - wrong dimensions

I'm trying to show images generated by a variational autoencoder using pyplot.imshow and make_grid. I can't show them, though, with the following error: "TypeError: Invalid shape (64, 530, 42) ...
avpol's user avatar
  • 21
3 votes
1 answer
361 views

Pandas Profiling Not Working

I have been working on EDA lately and i got to know about Pandas Profiling , but i am unable to import the module Pandas_Profiling , I could import the module on Google Collab but couldnt import the ...
Sahil Rathout's user avatar
0 votes
1 answer
67 views

Is this considered a good visualization of clustered data?

I have used sckit-learn to cluster data using K-means (3 clusters). I have an issue with considering the plot as "readable" since clusters are overlapping (even when encircling them) Any ...
SSSOF's user avatar
  • 17
0 votes
1 answer
63 views

Better understand the scatter plots

I'm trying to understand how to read a scatter plot based on the results of my confusion matrix. This is the CM: I saw an high correlation between column 5 and column 6, a low correlation with column ...
JimBelushi2's user avatar
0 votes
1 answer
565 views

How do I prevent ConfusionMatrixDisplay.from_predictions from showing the plot?

ConfusionMatrixDisplay docs say: It is recommend to use from_estimator or from_predictions ...
Dmitry Minkovsky's user avatar
0 votes
1 answer
856 views

How do I get pcolormesh to plot two distinct colormeshes on the same figure?

I am trying to plot 2 distinct colormeshes on the same figure. They are mutually exclusive, so there are no overlaps. This is my code: ...
megamence's user avatar
  • 109
0 votes
1 answer
2k views

pl.datetime plots as days since epoch or 1970, if formatted - polars and matplotlib

I'm attempting to port some old reports from Pandas to Polars. I am happy with the data, and am now attempting to plot a few time series. This is working, but I'm finding that matplotlib just doesn't ...
draeath's user avatar
  • 123
0 votes
1 answer
139 views

Ugly AUC curves. Sklearn. How to make AUC Curves less square

I dislike the square look of this AUC curve (SKLearn). The purpose of this question is "visual". Please post code snippets. This question is not requesting the theory behind the AUC. My goal ...
Full Array's user avatar
1 vote
2 answers
100 views

How can I best plot a dataset to visualize the tradeoff between two or more metrics combined?

Basically I have a datasets in which different metrics are present, imagine inference speed and model accuracy. Some models are fast but have lower accuracy, while some others are some what the ...
Hossein's user avatar
  • 565
0 votes
1 answer
126 views

problem on converting data to numpy array

I have pandas data frame data=df.loc[[0]] print(data) 0 3.5257,3.5257,3.5257000000000005,3.5257,3.5257... Name: testdata, dtype: object I need to convert it to ...
simond's user avatar
  • 73
3 votes
3 answers
592 views

Could you explain if this plot is good or bad. It is a sentiment analysis modelusing LSTM layers

Could you explain if this plot is good or bad. It is a sentiment analysis modelusing LSTM layers.20% of the data used for validation, and the remaining 80% for training.
SDhakZZZ's user avatar
0 votes
2 answers
46 views

What ML Algo should I use to plot & predict customer location vs. amount spent?

Im using real customer csv files from my ecommerce store. I was initially going to use k cluster with 2 values. I want the two values to be Province Code, and amount spend on my store. This will ...
ChickenJoe's user avatar
0 votes
1 answer
103 views

unable to bar plot the data for all the columns

I am trying to plot the data in a loop, I am using the below code to build the plot. but Its running for all the loop, I can see the column name is getting printed for all th but its building the plot ...
prakashrajansakthivel's user avatar
0 votes
1 answer
337 views

AttributeError: module 'graphing' has no attribute 'histogram'

I want to make a histogram plot, after importing the library called graphing it gives me an error even when it has been installed. ...
Lisa Chukwu's user avatar
0 votes
1 answer
734 views

Linear Regression line not showing in plot

It's a silly problem, I know, but it's getting my nerves. Everything seems fine, but I cannot get the line to show on the plot. I've put it in a public Google notebook, for your convenience. t ...
Ignacio Guerrero's user avatar
0 votes
2 answers
130 views

Understanding the relationship between two features

I am trying to solve classification task. Could you suggest me, if these two features are independent? the plot looks strange
Любовь Пономарева's user avatar
1 vote
1 answer
288 views

Annotate Statistical Significance on a Python Matplotlib graph

I'm tyring to compare a normal distribution to a histogram of actual data. I'm plotting the two with the following Python code: ...
DVCITIS's user avatar
  • 131
0 votes
0 answers
551 views

Creating a scatter plot with matplotlib with large dataset

I am trying to create a scatter plot from instrument peak area data recorded every tenth of a second or so. For some reason, when I try to plot it with Matplotlib, I get a straight line, which is not ...
Peter Bright's user avatar
0 votes
0 answers
59 views

Can python's matplotlib render images as quickly as R's Cairo device?

I need to render 100k of plots. I already am doing this quickly enough with R's Cairo device. But I am also considering using python. But, I also already know python's rendering of plots is several ...
ivan866's user avatar
  • 210
0 votes
2 answers
2k views

How to plot categorical variables with a pie chart

I am concerned with a single column (fruit) from my df: ...
Tom Bomer's user avatar
-1 votes
2 answers
1k views

Why I am having trouble plotting the AUC?

I am trying to plot the roc_auc curve however I am not getting any results. Any explanation here? Are there any problems with the number of data? Here is my example : ...
minattosama's user avatar
1 vote
1 answer
827 views

Network Visualisation (Python/Excel)

I have a large data set similar to that in the screenshot below: and I want to visualise the whole data set like the diagram below (made with a lot of effort in PowerPoint!) Is there any way to do ...
Barry O'Keeffe's user avatar
0 votes
1 answer
274 views

Matplotlib Surface Plot over L domain

I want to create surface plots over certain special domains, e.g., the L-shaped domain below. Currently, I am creating surface plots with matplotlib.pyplot in the typical way, i.e., creating a ...
user avatar
0 votes
1 answer
1k views

Plot distribution of multi classification with features - Python

I have a multi-class classification problem, and continuous features, I want to visualize using python libraries (matplotlib, seaborn, plotly..) the target variable ( 4 classes ) with each given ...
Legna's user avatar
  • 21
1 vote
2 answers
2k views

Why is matplotlib not plotting some boxplots?

I am trying to plot some data so get statistics about it, but matplotlib simply can't plot it as boxplots. I tried with histograms and it workd well: But when i change the code to plot boxplots it ...
Luís Otávio's user avatar
0 votes
1 answer
240 views

Converting RGB values to contour values

I am using matplotlib to generate a filled contour plot, please consider the below example as a sample contour plot. I want to read off the contour values from such a filled contour plot using opencv'...
Digvijay Rawat's user avatar
0 votes
1 answer
2k views

Plot multiple time series from single dataframe

I have a dataframe with multiple time series and columns with labels. My goal is to plot all time series in a single plot, where the labels should be used in the legend of the plot. The important ...
Davgrabner's user avatar
2 votes
1 answer
3k views

Plotting the confidence interval for a plot in python

I have a curve and I want to create the confidence interval for the curve. Here, I provide a simple example: ...
Sadcow's user avatar
  • 146
1 vote
0 answers
122 views

Plot polar coordinates (2D) on a Poincáre Sphere surface as either heat map or scatter plot [closed]

I have a dataset with 4 values - amplitude, psi angle, chi angle and class (color). The psi angle and chi angle represent unique points on a . I want plot these psi and chi values on this sphere co-...
Tarun Maganti's user avatar
1 vote
1 answer
5k views

How can I remove legend from the figure in seaborn?

Here is my diagrams, I want to remove the labels of the second bar that is C1,C2,C3,C4,C5, because it is repeating.
Tariq Hussain's user avatar
0 votes
1 answer
149 views

How to resolve this error while making bar graph?

...
nithin krishna's user avatar
0 votes
1 answer
432 views

Plotting two pd dataframes with n columns, each df representing an axis coordinate?

I have two dataframes which each have n columns (changes depending input), where each dataframe represents an axis coordinate. Each column represents separate lines I want to plot. Example dfs (1st ...
HK44's user avatar
  • 1
2 votes
1 answer
3k views

Plotting confusion matrix for multi classification problem

I am using google colab to solve a multi-classification problem. I am trying to plot the confusion matrix for this problem, I have tried doing so using : ...
AAA's user avatar
  • 145
1 vote
0 answers
24 views

clustering algorithms' evaluation [closed]

How can I show clustering performance of various clustering algorithms on various datasets using adjusted mutual information and adjusted rand index. for instance, the plot below .
Alireza's user avatar
  • 11
1 vote
1 answer
594 views

how to convert pandas plot to OO Matplotlib bar chart

I am trying to convert pandas dataframe bar plot to matplotlib OO concept. ...
Dharmeshsharma's user avatar
0 votes
1 answer
2k views

How to save the history epochs and plots in files from keras models

I have a question, that maybe is very simple, but I can't do it: I have 3 neural networks which are trained with 100 epochs, and I need to save all the history's train displayed at the end in a .txt ...
megasaw's user avatar
  • 13
1 vote
1 answer
506 views

Elegant way to plot the L2 regularization path of logistic regression in python?

Trying to plot the L2 regularization path of logistic regression with the following code (an example of regularization path can be found in page 65 of the ML textbook Elements of Statistical Learning ...
lostwanderer's user avatar
1 vote
1 answer
38 views

How can I improve this chart?

I have a chart like this: There are some problems that I am stuck: Some columns value are very small compared to others, so I cannot identify whether they are zeros or not (I used logarithm scale, ...
Will's user avatar
  • 11
0 votes
0 answers
50 views

Trying to understand a PCA output

I recently ran a code to generate PCA for a movie ratings dataset. Actually there were two different datasets, a 'movies' and a 'ratings' one. The movie had about 9700 rows of different movie titles ...
ShridharK's user avatar
  • 101
0 votes
1 answer
409 views

need an explanation of the For Loop in the DBSCAN algorithm Demo

In the following code of the DBSCAN algorithm, as a beginner I need an explanation for what happens to the data in the bottom for loop and why ? Generate sample data ...
soufi-43's user avatar
0 votes
1 answer
30 views

configuring axis in matplotlib

x = np.random.rand(200) and y = 12 * x - 4 + np.random.randn(200) After ploting the (x,y) values I get the following graph in matplotlib: How can I configure the axis so all samples are clearly ...
joseph's user avatar
  • 107
0 votes
1 answer
46 views

Rearrange step chart in tkinter

I'm developing this project in Python using the Tkinter, ElementTree, Numpy, Pandas and Matplotlib packages: ...
PureEncoding's user avatar
0 votes
1 answer
6k views

Bar plot not showing up in Jupyter Notebook

I am trying to create a bar plot for a Pandas Series and the bar plot is not showing up in Jupyter notebook. When I run the cell, I only get the following and I do not see the bar plot. ...
Brindha Ganesan's user avatar
1 vote
1 answer
355 views

Types Of Plots for Discrete Data

So I have a lot of discrete variables in my dataset and want to visualize them (univariate for now). I went through various articles over the internet and it is suggested that histograms and count ...
ml_learner15's user avatar

1
2 3 4 5