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
0answers
14 views

Different learning curves on each run

Sorry for the wrong terminology I might use, since I’m a noob. For my supervised learning project for the university I have a dataset (features and labels) which has to evaluated in several ways and ...
0
votes
1answer
19 views

Plot a training/validation curve in Pytorch Training [closed]

I have the following training method and I'm confused how may I modify the code to plot a training and validation curve history graph with matplotlib ...
1
vote
1answer
39 views

How to plot multiple bar charts with different infill and outline?

I have the CSV's of data. I want to plot the distribution of every attribute or a single one to compare the distribution from other CSV's, Since all attributes are the same but the distribution is ...
0
votes
1answer
94 views

How to plot the bar charts of precision , recall and f-measure?

I have used 4 machine learning models on a task and now I am struggling to plot their bar charts just like shown below in the image . I am printing classification report to get precision , recall etc ....
1
vote
0answers
26 views

Distplot 'a' parameter, does not make logical sense to me, can anyone explain?

Most sns plot parameters have names that make somewhat logical sense, For example scatterplot has the x attribute to choose what to plot on the x-axis, and y for y-axis. Similarly kdeplot uses the ...
1
vote
2answers
98 views

Autenocoder and anomaly detection task

I'm trying to create an autoencoder for the anomaly detection task, but I'm noticing that even if it performs very well on the training set, it starts to stop recreating half of the test set. I tried ...
0
votes
1answer
26 views

Visualization with many lines, colors, and markers

I have a bunch of plots as the one reported below. The data is from measurements performed on different times and different days. In the plot (which is a cumulative distribution function, if that ...
1
vote
1answer
37 views

Create a single time series plot of multiple devices [closed]

I have a dataset where there are stored the measurements of 30 devices. Each device has about 4000 values and it is structured as well: ...
0
votes
1answer
31 views

Plot overlapping time series [closed]

I'm trying to plot my test set and test set predictions to check the differences and see how my autoencoder reconstructed the data, but since I have a test set 30x10 I have a huge visualization ...
1
vote
1answer
1k views

TypeError: Image data of dtype object cannot be converted to float [closed]

I am trying to convert files stored in a CSV file dataset to grayscale. I run the code which worked on my previous dataset but I now get this error: TypeError: Image data of dtype object cannot be ...
0
votes
1answer
97 views

How can I get rid of the white space in matplotlib?

I am doing a course in edx. While plotting in python, there is always a blank space before the beginning of the plot. In StackExchange, I have found a solution, which is mentioning the axis limit. ...
0
votes
1answer
16 views

How do i get the loss function graph?

I used Mini-batch gradient descent to train the model, but i am unable to get the proper loss graph. The loss graph is always showed as a straight line. I know there is something wrong but would ...
0
votes
1answer
35 views

What is “Missing” in output of plot_tree API of XGBoost

What this "Missing" term means here at each node after split in Image? and also what is at leaf, is this means prediction value? I converted Output variable to 1 and 0. I tried searching on ...
0
votes
1answer
21 views

Unsynchronized time series visualization

I would like to visualize a large amount of events composed of time serie windows. A typical event would be: Problem is, my events are not synchronized, and so if I plot them all, it would look like: ...
0
votes
1answer
268 views

Python: How to plot time interval from a Dataframe in Pandas

I have the a dataframe(df) which has the data of a Job being executed at different time intervals. It includes the following details about the execution of a job: ...
0
votes
1answer
26 views

Matplotlib error

I was trying this simple code and am unable to find the error I made in it. My code: ...
1
vote
0answers
19 views

Multiclass Classifier comparison decision regions

How can I get the very same effect of this tutorial in Scikit Documentation with more than 2 classes? Let's say we'll keep only the first dataset (the linear separable one) and substitute it with <...
0
votes
1answer
34 views

How to show two pictures in one cell in Jupyter Notebook? (matplotlib) (python) [closed]

As a beginner, can someone please help me with this? Is there any way to show both pictures in a single cell's output? My output could only display one picture. Thank you for your time and attention! ...
0
votes
1answer
53 views
0
votes
1answer
28 views

whats wrong with the graph [closed]

I wanted to plot a bar graph which shows covid cases reported in different regions in different regions of USA. So here is my code: ...
1
vote
1answer
35 views

plotting time series data using matplotlib python

I am trying to visualize Time series data is as follows following is my code to plot the data plt.plot(data['date'], data['c_16_avg_a']) ...
1
vote
1answer
25 views

How to improve performance of Tensorflow's CNN example? [closed]

In the example in this link: https://www.tensorflow.org/tutorials/images/cnn, the performance is over 70%, how can I improve it? What parameters do I need to tweak? Thanks.
1
vote
1answer
54 views

How to plot multiple models val and traing acc/loss curve from csv files?

I trained multiple CNN models, after that, I saved models details (Like , training/Validation Acc/Loss ) by callbacks by using this codes : ...
1
vote
0answers
6 views

Getting different visualization results for jupiter and datacamp existing code shell. How to solve this? [closed]

The left one image is in jupiter notebook and the right one is from datacamp exercises. Can anyone please let me know why I am getting different results in Jupiter? Used hacker statistics to calculate ...
1
vote
4answers
43 views

Visualising feature selection results for multiple classifiers and feature subset sizes

I am using information gain feature selection technique to get different features subset sizes for my dataset, like so: ...
0
votes
2answers
22 views

Time Series data visualization

When I visualize data using matplotlib it displays very well, but when using Plotly, the data display very bad.
-1
votes
1answer
22 views

How to specify a location for text in a graph plotted by Python?

I would like to plot a graph of actual and predicted values with Python after doing a regression. I used the following codes. However, the text "R^2=0.91" is placed on the right hand side ...
0
votes
0answers
17 views

How to plot segmented bar chart (stacked bar graph) with Python?

cat = {'A':1, 'B':2, 'C':3} dog = {'A':2, 'B':2, 'C':4} owl = {'A':3, 'B':3, 'C':3} Suppose I have 3 dictionary, each containing pairs of (subcategory, count). How ...
1
vote
1answer
54 views

Distribution of Regression Residuals: Is this a normal distribution?

I've created a histogram as well as a QQPlot from the residuals of my Regression Model: Mean: 0.35 Standard Deviation: 18.14 Judging from these plots, is it okay to say that my residuals are normally ...
0
votes
2answers
20 views

Information Visualization: which parameters should a data scientist plot to best explain the work behind a Neural Network?

I'm a beginner in the field and I wrote and trained my first Convolutional Neural Network from scratch. I would like to know what types of graphics and parameters a data scientist uses to plot to ...
1
vote
2answers
63 views

How plot GridSearch results?

I trained an SVM model with GridSearch ...
2
votes
1answer
83 views

Understanding and find the best eps value for DBSCAN

I'm trying to run the DBSCAN algorithm on this .csv. In the first part of my program I load it and plot the data inside it to check its distribution. This is the first part of the code: ...
0
votes
1answer
4k views

how to create multiple subplots( scatterplot) in for loop

I want to create scatterplot of target variable with all the other variables in dataframe. Just like we create pairplot but as pairplot with large number of variables will take lot of time and ...
0
votes
1answer
21 views

add labels bar chart

There is this dataframe: print(df) df.plot.bar(figsize=(10,5),fontsize=14,) plt.title('counts',fontsize=15) plt.show() barh:...
0
votes
1answer
70 views

How to add Error Bar to Matplotlib line plot?

I have the following dataset which I use to plot a line plot. The plot is obtained as the mean of values obtained from the data. I want to add error bars to this ...
0
votes
1answer
156 views

Time series plot using netcdf data in python

I am trying to plot a time series for a 3d plot. I know that the variable must be made 1d inorder to make it viable for the time series plot. Actually I want the data within a box of latitude and ...
0
votes
1answer
1k views

How to create these two plots from two arrays with numbers?

I have two numpy arrays, one with the data for x axis and another one with the data for the y axis. The position i in each array matches the other array. Some values in the x axis array are repeated. ...
0
votes
0answers
9 views

How can I plot a bunch of images, given their centre coordinates?

The points here represents centre coordinates of images with unique names. I want to plot all the images on the same 2d space to get a final representation of all the images merged into sort of a ...
0
votes
1answer
214 views

How to add a filter/query/condition in Plotly [closed]

I want to add a condition to the column where attractionName.value_counts() >=165. How can I add a query/filter/condition to a DataFrame before I plot the data. <...
0
votes
1answer
43 views

Data visualization on three factors

I have three factors, Income(from source A),continuous variable Income(from source B), continuous variable Happiness index,continuous variable Suppose I have 500 samples. My goal is to show the ...
0
votes
1answer
25 views

Time Series Plot for floating values

I have a Dataframe which looks as shown below I am trying to make a line plot for looking at the peaks for both columns (a,b), I have gotten as far as ...
0
votes
1answer
41 views

Differences between pseudocolor plot and heatmap?

I found some materials using the word `pseudocolor plot' and I think that it's just a heatmap. Is there any difference between them?
2
votes
1answer
38 views

What is the most straightforward way to visualize color-coded clusters along with the cluster centers?

I have applied the kMeans Clustering algorithm to a dataframe and have gained cluster labels for each row. I had selected only two features. There are 4 clusters. I want to visualize the datapoints in ...
1
vote
1answer
75 views

Decision boundary for KMeans clustering algorithm

Below code is used for plotting decision boundary for KMeans clustering. I understand contour in general, my question is, how does plot (contour method) know where to draw decision boundary based on ...
2
votes
1answer
25 views

How to visualize categorical data with numeric columns

I have data like as shown below I would like to represent the above tabular data in a visual form. However, the below graph may not work because my real data as 50K unique drug names. So, is there ...
2
votes
0answers
58 views

how can i plot probability distribution of my classes in the way below?

All, I would like to plot the following: I have a binary classification problem where I am using xgboost as my 'model' below: ...
1
vote
1answer
28 views

Plot three series on the same plot grouping data by day and month

I've a three years data set which I want to plot so to compare the data by data and month, but I'm having an hard time with the final result. I'm nearly there, I guess, but for some strange reason, ...
0
votes
0answers
26 views

How may I may fit the cluster number while it is going to the outside of the X-axis and when visualizing clusters in two dimensions?

I am writing code for DBSCAN clustering. I find the eps value which is 0.12 with the help of ...
0
votes
0answers
27 views

Bar-chart naming issue in Python code

I have a problem with labelling this bar graph. The 'blue' bar that indicates ML has 5 ml models and I'm trying to rename each of the 5 blue bars given into 5 ml model names obtained from the 'index' ...
0
votes
0answers
16 views

Visualize multiple causes

Goal: Visualize why loans are rejected which can be due to multiple reasons. A loan is either rejected or accepted. Any rejection is caused by one or more rejection reasons. There is a list of ...