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®.

0
votes
0answers
6 views

Plotting the value change in regression CNN

I have trained my CNN on thousands of images with different hyperparameters, now I want to show the difference on the output for each individual image. I mean ...
0
votes
0answers
26 views

Jupyterlab Inline Interactive plot

I am trying to make my inline plots in jupyterlab interactive. So far, I have tried a suggestion as pointed out here, among others: https://stackoverflow.com/questions/50149562/jupyterlab-interactive-...
2
votes
1answer
32 views

Is there a way to put a separate line between clusters for k-Means Clustering?

k-Means Clustering is a method of vector quantization, originally from signal processing, that is popular for cluster analysis in data mining. here is a piece of code to perform a 2-d k-Means ...
4
votes
2answers
39 views

Which plot to use for data spanned on multiple years?

I've a dataset of - Number of accidents that happens in each state. The dataset spans from 2001 to 2014. Which plot should I use to represent the information - number of accidents in each state per ...
3
votes
1answer
70 views

Plotting Weibull distribution on Wind Speed

I have a 720 hourly set of wind speed and wind direction data and I want to fit the Weibull Distribution on it. After searching for some time, I wrote the following code in Python to get my ...
2
votes
0answers
13 views

Z values get rescaled while plotting in 3d

x_3d = 5.171875 , 5.3125 , 5.171875 ... 6 y_3d = 0, 1, 2, 3, 4, 5, .... 1500 (1500 points) z_3d = -10.493983 , 22.128998 , -14.582531 , 34.687847 , 11....
1
vote
0answers
22 views

How to create a heatmap inside a polar chart [closed]

I would like to build something like this. Creating a polar chart isn´t an issue, but i have no idea how to implement the round areas and the color gradients into the plot.
0
votes
1answer
28 views

Plot misclassfied values in matplotlib

I have two lists. One is target and another is predicted values in a binary classification. The target is always zero. And I have to plot the results of the prediction against target in such a way, ...
1
vote
1answer
10 views

Scatter Plot with Conditions

Suppose I have a data frame name = ['A', 'B', 'C'] score = [2,4,6] I want to create a scatter plot with the following conditions, color the bubble as green if ...
0
votes
1answer
19 views

Is my iPython Installation Valid?

I just want to know if my ipython is properly installed. I have both Python and Anaconda installed on my Windows. I entered the "pip3 install ipython" command on the Command Prompt and it downloaded ...
0
votes
0answers
6 views

Using seaborn styles and custom matplotlibrc simultaneously

I would like to use the seaborn styles, but also keep my matplotlib settings. For example, I would like larger default label ...
0
votes
0answers
18 views

Using Matplotlib [duplicate]

I am new to data science. I use Anaconda on windows 7. I plotted a sine curve by doing the following on iPython: ...
1
vote
1answer
28 views

Naming the Axes of my Graph on iPython Using Matplotlib.pyplot

I am new to data science. I use Anaconda on windows 7. I plotted a sine curve by doing the following on iPython: ...
0
votes
1answer
40 views

how to draw a negative exponential plot of this situation with python

I have a dataset with binary output ($Y$) and I have a column (Duration) contains the duration of each task that is stored by "days" and varied from 1day to 350 days. when I think logically in our ...
0
votes
0answers
45 views

Why is my Seaborn distplot creating bouncing lines instead of smooth lines?

I'm using Jupyter notebook working on the Kaggle Titanic dataset, trying to create a seaborn distplot to compare the 'Sex' variable (0 is male, 1 is female) with the 'Survived' variable (Survived is ...
2
votes
1answer
33 views

How can I get variable values from a plot?

I would like to know if there is any way in python to automatically determine the values of point a and b marked in the graph below. Said a different way, finding the values when my plot shows a ...
1
vote
0answers
24 views

Python equivalent of Wolfram Language ParametricPlot3D?

The Wolfram Language as a ParametricPlot3D that can be used to interactively examine parametric functions in 3D. Which Python package and function(s) best ...
1
vote
0answers
18 views

same color scheme for 2 pie charts

I want to visualize statistics from two large dataframes with similar data in two pie charts. I would like for these two charts to use the same color when the same category appears in the chart. I ...
1
vote
0answers
18 views

How to draw diagram like this one (errorsbar)

I would like to draw a graph that looks like this one from: The closest I have come is this graph: by this code: ...
1
vote
1answer
44 views

How to make this plot with python

I want to draw plot by python based on this data ...
0
votes
1answer
21 views

Why do histogram bars vanish when we keep the bins value high in matplotlib?

Also, the histogram bar widths are different on certain values of bin. How to keep the bar widths uniform? I have tried using the rwidth but that dos not solve my problem. Data: ...
0
votes
1answer
22 views

What's the best way to plot a bar graph with large numeric difference in values?

I'm graphing the value of the Ruble against the US Dollar in the 1990s. There was hyper-inflation from 1992-1997 (where the "y" values expanded from 125 to 6000). On Jan 1st 1998, the government ...
1
vote
1answer
62 views

Any suitable way to describe the distributions of 2 Pandas Dataframes visually/graphically?

I am aware of the fact that the Pandas Dataframe's Statistical description can easily be obtained using df.describe(). I am having 2 dataframes of the same ...
2
votes
0answers
26 views

How to force histogram plots to have same axes?

I am comparing my trained model with other benchmark models with the error histogram but the axis of histogram is different for each method as shown in figure.For instance to plot the error histogram ...
1
vote
1answer
972 views

How to show percentage (text) next to the horizontal bars in matplotlib?

I am using seaborn's countplot to show count distribution of 2 categorical data. Fine it works but I want the percentages to show on top of the bars for each of the plot. Please how do I do it? ...
1
vote
1answer
72 views

Histogram is extremely skewed to the left

everyone. Hope you are all okay. I am pretty bad at visualizations in Python. I am working on a movie dataset and now I want to understand how values of variable 'vote_count' for every movie in the ...
2
votes
1answer
37 views

Name of this type of cross variable interaction Plot

In recent papers of Social Network Analysis , I have been observing this particular type of graph used increasingly. I looked for what they are called to replicate the graph, but couldn't find the ...
0
votes
1answer
28 views

matplotlib subplots_adjust - meaning of parameters

What are the meaning of values in subplots_adjust ? left = 0.125 # the left side of the subplots of the figure The documentation has number 0.125, etc but there is no explanation.
1
vote
1answer
184 views

Stacked barchart, bottom parameter triggers Error: Shape mismatch: objects cannot be broadcast to a single shape

I am working in python3 and I want to obtain a stacked barchart plot, showing three different variables on 5 different columns. My code works fine if I do not add the 'bottom parameter' in plt.bar (...
0
votes
1answer
144 views

How to set limits of Y-axes in countplot?

df in my program happens to be a dataframe with these columns : ...
0
votes
1answer
39 views

How to print x-axes labels in pandas.Series.plot()?

I am trying to visualise my data to understand the data skewness. For that purpose, I use the below and get desired output - ...
2
votes
2answers
249 views

keras plotting loss and MSE

Can someone give me a tip on how I could incorporate MSE & loss plots? I have been following some machinelearningmastery posts to plot this but the application is classification and I am ...
1
vote
1answer
29 views

How to place multiple graphs in same coordinate system (pandas,mathplotlib) -> look pic [closed]

in short how to set graphs in same coordinate system, not separated as in pic each in its own coordinate system in one frame....
4
votes
1answer
300 views

How can I plot/display a dataset or an image distribution?

I want to view a specific image or a dataset's distribution, and see if they are different. Does simply writing something like : ...
2
votes
1answer
696 views

Is there a way to Label/Annotate My Bubble Plot (Scatter plot with a z-axis) on matplotlib?

I would like to label my bubble plot, with the labels being INSIDE the bubbles. Something like this. Is There any way to do that? What I've tried: ...
3
votes
1answer
29 views

Ploting eigenvectors

I've generated two clouds of 3d points from multivariate_normal ...
2
votes
1answer
118 views

ggplot (in R)/matplotlib (in Python) with linear model?

How can I plot the histogram below, using ggplot (R) and/or matplotlib (...
1
vote
1answer
773 views

Matplotlib — TypeError: 'module' object is not callable

I am new into ML. As per video tutorials when i try to execute the following lines i get an error. However the instructor get successful execution. Error is : i have google about it but didnt get ...
1
vote
1answer
743 views

How to extract numerical data from a matplotlib scatter plot in python?

I have a scatter plot with about 19,000 data points. By visual inspection, I noticed some points for which I want to look at the corresponding numerical data from the data frame (basically a subset of ...
2
votes
1answer
103 views

Twitter Retweet Network Visualization

I am trying to visualize retweet network in order to find out which users are most likely to have most influence on other users. Here is my code: ...
1
vote
1answer
35 views

How do I assign a title to each of the histograms I have posted at the same time? [closed]

fig, axes = plt.subplots(1,7, sharey=True) df2.loc[df2.country == 'BR','date_created'].hist(xrot=90,bins=30,ax=axes[0],figsize=(20,4)); df2.loc[df2.country == 'CH','date_created'].hist(xrot=90,bins=...
4
votes
1answer
176 views

unable to plot contour/surf graph of cost vs parameters for multiple linear regression.In python

After running gradient descent I have three arrays theta1 theta2 and J all three of size num_iterationx1. I tried plotting contours using the contour function in Axes3D and 3d surface plot using surf ...
1
vote
1answer
67 views

Error when box plot [closed]

Code: ...
2
votes
1answer
28 views

How to add numbers to the axes of a graph?

I am trying to make a graph of k (as in k-means) vs error, and I can't get it to show the actual number of k on the x-axis (1-15, not just the even numbers), nor any any numbers at all if I add a ...
3
votes
1answer
5k views

Plotting in Multiple Linear Regression in Python 3

So I'm working on linear regression. So far I've managed to plot in linear regression, but currently I'm on Multiple Linear Regression and I couldn't manage to plot it, I can get some results if I ...
0
votes
3answers
9k views

Scatter plot for binary class dataset with two features in python

I have my dataset that has multiple features and based on that the dependent variable is defined to be 0 or 1. I want to get a scatter plot such that all my positive examples are marked with 'o' and ...
2
votes
1answer
829 views

How to scatter plot with each dimension having its own color

I want to get insight for some values. I have two vectors of 300 dimensions, and want to compare them coordinate by coordinate. So I thought to plot each point with a different color, but the color ...
1
vote
0answers
94 views

How to best visualize data when outliers lead to lack of contrasting colors for the rest of the plot?

I have plotted the following map of Philippines according to the population in its regions, using matplotlib.pyplot in Python 3: As can be seen, there's one ...
1
vote
2answers
5k views

ValueError: not enough values to unpack (expected 4, got 2)

I have written this code fig, (axis1, axis2,axis3, axis4)=plt.subplots(2,2,figsize=(10,4)) and I am getting this error ...