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®.
216 questions
1
vote
1
answer
63
views
Rearrange step chart in tkinter
I'm developing this project in Python using the Tkinter, ElementTree, Numpy, Pandas and Matplotlib packages:
...
0
votes
1
answer
7k
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.
...
1
vote
1
answer
499
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 ...
0
votes
1
answer
3k
views
What's the issue with my code for visualizing linear regression in 3 dimensions with matplotlib? [closed]
I am trying to use linear regression that takes two variables "Idade" and "LF" and tries to predict a third one, "DGAF". I'm trying to both do the scatterplot with the ...
1
vote
1
answer
7k
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
1
answer
223
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
1
answer
9k
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
0
answers
41
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
2
answers
287
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 ...
2
votes
1
answer
620
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
1
answer
217
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
1
answer
2k
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 ...
3
votes
1
answer
39k
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 ...
7
votes
1
answer
56k
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. ...
1
vote
1
answer
276
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 ...
1
vote
1
answer
1k
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
1
answer
255
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
1
answer
4k
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
1
answer
853
views
Matplotlib error
I was trying this simple code and am unable to find the error I made in it.
My code:
...
1
vote
0
answers
34
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
1
answer
6k
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
1
answer
2k
views
0
votes
1
answer
46
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
1
answer
849
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
1
answer
48
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
1
answer
1k
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
0
answers
55
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
4
answers
203
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
2
answers
156
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
1
answer
257
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
1
answer
845
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
1
answer
772
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
2
answers
117
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 ...
3
votes
2
answers
6k
views
How plot GridSearch results?
I trained an SVM model with GridSearch
...
2
votes
1
answer
1k
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:
...
2
votes
1
answer
29k
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
1
answer
256
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
1
answer
616
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
1
answer
1k
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
1
answer
4k
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. ...
1
vote
1
answer
2k
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.
<...
1
vote
1
answer
181
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 ...
1
vote
1
answer
1k
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
...
1
vote
1
answer
323
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
1
answer
258
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 ...
2
votes
1
answer
301
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 ...
3
votes
0
answers
598
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
1
answer
76
views
Plot three series on the same plot grouping data by day and month
I have a dataset containing three years of data which I would like to plot and compare by date and month; but, I am having a hard time with the final result.
I am nearly there, but for some strange ...
0
votes
0
answers
71
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 ...
4
votes
2
answers
965
views
Seaborn Scatter plot
I have a dataset containing of only one column, using matplotlib I was able to do the scatter plot the following way
...