Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [matplotlib]

matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms.

1
vote
0answers
12 views

Is there a way I can plot my data as an animated graph with respect to time? [on hold]

I am looking to create an animation that plots data onto a graph so it appears on screen gradually. My data comes in the form of a row vector, where the actual values in the vector will be plotted ...
0
votes
0answers
17 views

Overlap of Two Probability Distributions in Python

So I saw someone use this code to find out how much overlap two normal distributions have. ...
0
votes
0answers
24 views

Python: How to find the value that separates 2 different clusters?

I am applying an unsupervised learning algorithm for building an anomaly detection using OneClass SVM method and then plotted it to visualize how it looks. I got 2 clusters: one red and the other ...
0
votes
0answers
21 views

Finding similarity dissimilarity between different groups of vectors

Suppose I need to combine or group together set of vectors in one area and another group in other areas, however I need to place these groups in a plot so they are scattered in the screen per ...
1
vote
0answers
23 views

How to plot the gradient descent of a RNN model built using keras? [closed]

I'm exploring how an LSTM solves the problem of vanishing gradients. I have created a simple LSTM model on keras. I know that model.fit() returns a history object that stores model loss and accuracy ...
0
votes
1answer
15 views

Matplotlib: Why would a KNN regression model draw a line through ALL points regardless of K?

Having difficulty doing something very basic: create a random dataset taking on values between -1,1, plot them, and also fit a KNN model to the data and fit it over the data. Using numpy to create the ...
-2
votes
2answers
32 views

Choosing the right type of plot for my pandas dataframe

I have been confused because I don't know which type of plot I must choose. I have a data frame with two columns suppose the first one is the id of a person and the second one the number of houses ...
1
vote
0answers
74 views

how to visualize the graph use matplotlib on polynomial and multiple regression with multiple predictors

Multiple: y=b0+b1X1+b2X2+b3X3....bnXn Polynomial: y=b0+b1X+b2(X)^2+....bn(X)^n Step1: Importing package import pandas as pd import numpy as np import sklearn import matplotlib.pyplot as plt import ...
0
votes
0answers
174 views

Get rotation of noisy rectangular 2d point cloud with pca

I have a set of point clouds in nd space. The clouds tend to be rectangular in nature in 2d space but can easily have outliers or look slighly L shaped. I would like to rotate the point clouds so that ...
1
vote
1answer
39 views

Detect clusters from graph [closed]

Sorry for my English but I will try to explain my problem statement.I have a csv with near about 156 columns. I want to plot the Scatter graph with one of the columns as X axis and another one as Y ...
2
votes
0answers
287 views

Estimating the multivariate normal distribution parameters from a set of 3D points

I have a set of 3D points, which look as follows: They form a shape similar to Gaussian/parabolic function or a mixture of these and my goal is to extract this shape. I thought I could estimate ...
1
vote
0answers
187 views

Matplotlib Plot Difference Between Two Unsorted Value Series

I am trying to figure out how to plot the following in Matplotlib. Suppose I have a sample of 1000 random operations. There are two ways to perform each operation: a new way and an old way. My data ...
1
vote
0answers
158 views

Fitted planes' normal vector not perpendicular

I fitted a plane into a set of points in R3 using minimization of L2 error (taken from this post: https://gist.github.com/amroamroamro/1db8d69b4b65e8bc66a6). ...
0
votes
1answer
41 views

How to get insights from an amalgamation of histograms

I want to see how the age of road traffic accidents victims change throughout the year. Ive done this by amalgamating lists of the ages of victims from 05-16 and created a histogram for each year. Ive ...
1
vote
1answer
543 views

Calculate a p-value for SVM-plots on Iris dataset (2D-data) [closed]

I analyzed the Iris dataset by using the Python libraries: Matplotlib, seaborn, sklearn and mlxtend. An example of a plot is shown : and my code is : ...
1
vote
0answers
62 views

Visualisation strategies for weight matrices in convolutional neural networks

What are some common strategies to visualise a weight matrix in a convolutional neural network? I.e. visualise a matrix with the form (kH, inD, outD) in 1D convolution, and (kH, kW, inD, outD) in 2D ...
0
votes
0answers
11 views

Enhance gap between analytic and interpolated data in visualization

I have two data sets, disposed in a 3Dplot. one set represents the interpolated data, the other the analytic. Each set lies on a separate grid. I have plotted the data with python matplotlib on a ...
-1
votes
1answer
877 views

How to interpret the dendrogram graph axis (hierachical clustering )?

Here is the reproducable code with dataset used `from scipy.cluster import hierarchy import matplotlib.pyplot as plt ytdist = np.array([662., 877., 255., 412., 996., 295., 468., 268.,400., 754., ...
0
votes
1answer
407 views

Doing PCA with $m$ vectors in $d$ dimensions and then plotting only $n$ vectors, when $n<d<m$

I have a dataset with about 2 million vectors, the dimension is 200 (D = 200). I want to plot just a few (N = 20) of them in a ...
-1
votes
1answer
51 views

How can I plot the correlation between app downloads and session duration?

For example, the data could be: App A, 100-500 downloads, 20 mins App B, 100-500 downloads, 75 mins App C, 500-1000 downloads, 30 mins and so on. I want the overall correlation as well as app-wise ...
0
votes
0answers
58 views

Visualizing a time series data to compare the scores of groups based on each day of participation

I have the following data but not sure about the best way to visualize it. Average assignment scores for the users starting to participate in the first, second, third, and so on, days of the course. ...
1
vote
0answers
543 views

How to compute the normalized overlap area between two curves [duplicate]

I am trying to calculate the overlap area (normalized by the total area) of two plots. The plots are from X Y datasets. I saw a lot of questions about getting the overlap area but from normal ...
2
votes
1answer
1k views

How to Illustrate correlation in binary classification

I ran a correlation in a binary classification problem between one variable and the prediction to determine whether a linear correlation exists. The code: ...
0
votes
1answer
993 views

How to visualize (make plot) of regression output against categorical input variable?

I am doing linear regression with multiple variables. In my data I have n = 143 features and m = 13000 training examples. Some of my features are continuous (ordinal) variables (area, year, number of ...
2
votes
1answer
2k views

Can a Precision-Recall curve or a ROC curve be horizontal?

I am working on a binary classification task on imbalanced data. Since the accuracy is not so meaningful in this case. I use Scikit-Learn to compute the Precision-Recall curve and ROC curve in order ...
1
vote
1answer
189 views

What kind of graph should I choose

I have gathered criminal activity and GDP from 2012 to 2015 for over 30 countries and I'm trying to confirm my hypothesis about how higher GDP decreases criminal activity, but I'm baffled over which ...
2
votes
2answers
331 views

Best way to visualise impact distance against launch speeds and angle

I am modelling the trajectory of a projectile, incorporating atmospheric drag. I am calculating the distance from the launch point for when the projectile impacts the ground. I have generated this ...
0
votes
0answers
539 views

Convert time scalar field to velocity vector field

I am trying to figure out if it's possible to create vector velocity field from some raster containing spatial distribution of scalar variable (timestamp of some mass-media event in my case). Here is ...
3
votes
1answer
3k views

Plot the probability mass function

I am trying to plot the probability mass function of a sample of a discrete metric. If it was continuous, I know that using pandas it would be as simple as calling: ...
0
votes
2answers
10k views

Plotting a Gaussian in Python

I am trying to plot a histogram of my data, and I seem to be a little confused here. I am using matplotlib in Python. Here is the code from their website: ...
1
vote
1answer
1k views

Too big (?) histogram values when using normed histo options in SciPy and matplotlib

I have been trying to create a normed histogram using either SciPy or matplotlib (or anything for Python). When I create my histogram with 'normed' option disabled, it looks like below (this example ...
0
votes
0answers
804 views
4
votes
1answer
6k views

Label on the y-axis in a normalised histogram

If you have a histogram with frequency on the y-axis and bins for different ranges of values on the x-axis, then it is reasonable that the label on the y-axis should be frequency. But if these ...
6
votes
2answers
6k views

Interpreting weird box plot with reversed whiskers

Although I'm fairly new to box plots, I thought I had got the hang of them, until I came upon this one today. I don't know what to make of that bottom "whisker" drawn inside the box. This population ...
8
votes
4answers
23k views

Finding outliers without assuming normal distribution

I have small datasets of size 40-50 points. Without assuming that the data is normally distributed I wanted to find out the outliers with 90% confidence at least. I thought boxplot could be a good way ...
6
votes
4answers
1k views

How to display magnitude of change over time between two series?

Disclaimer: I know absolutely nothing about statistics. I've had trouble searching for answers to my question, as I don't have much knowledge about the terminology of statistics. I'm currently ...
13
votes
2answers
18k views

Show average instead of median in boxplot

When plotting a boxplot with python matplotblib, the lines halfway the plot is the median of the distribution. Is there a possibility to instead have the line at the average. Or to plot it next to it ...
20
votes
2answers
87k views

How to name the ticks in a python matplotlib boxplot

Python matplotlib has a boxplot command. Normally, all the parts of the graph are numerically ticked. How can I change the ticks to names instead of positions? For illustration, I mean the Mon Tue ...