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

Questions tagged [matplotlib]

The tag has no usage guidance.

1
vote
1answer
39 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
0answers
20 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 ...
1
vote
0answers
14 views

Date/Datetime of Matplotlib not compatible with those of Pandas/Python3? [on hold]

Is Datetime in Matplotlib different from that of the Datetime used in Pandas or Python3? Does it need to be explicitly converted using Matplotlib functions such as ...
0
votes
1answer
14 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.
0
votes
0answers
14 views

How to use Matplotlib FixedLocator ticker locs parameter [on hold]

The Matplotlib ticker FixedLocator has locs as a required parameter shown below. class matplotlib.ticker.FixedLocator(locs, nbins=None) My question: What is ...
1
vote
1answer
21 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 satcked 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
14 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
24 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 - ...
1
vote
2answers
34 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
25 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
69 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 : ...
1
vote
1answer
48 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
28 views

Ploting eigenvectors

I've generated two clouds of 3d points from multivariate_normal ...
2
votes
1answer
76 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
368 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
213 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
73 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
21 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
137 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
32 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
3k 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
5k 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
409 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
64 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
3k 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 ...
0
votes
1answer
2k views

How to create a historical timeline using Pandas Dataframe and matplotlib

So I've seen a few answers on here that helped a bit, but my dataset is larger than the ones that have been answered previously. To give a sense of what I'm working with, here's a link to the full ...
1
vote
0answers
24 views

n days back avrage for each day

I have dataset as below and i want to see 3 days high low avrage, back from for each day in same plot. ...
1
vote
0answers
86 views

How to plot a 3-axis bar chart with matplotlib (and pandas + jupyter)

I'm a bit confused about how to go about plotting a 3-axis bar chart: So my jupyter notebook reads in an excel/sheet and I have a table: ...
1
vote
1answer
25 views

Data Visualisation for Dataframe having 3 columns

I have the below data, I am looking for a effective visualization or graphical method (in Python) to understand how the err is distributed with respect to min and max. ...
0
votes
0answers
431 views

how to plot a matplotlib non blocking figure using mpl_connect?

I am ploting a figure using matplotlib. In this figure I have a simple interactive feature: when you hover the mouse over some data, some annotation appears. How can I plot this and continue with my ...
7
votes
3answers
130 views

How to plot clusters in nice a way?

I have a large text dataset clusterized. Each cluster is represented by a centroid of the vectorized texts that belong to it, the number of texts, the created date, and other parameters. I can't plot ...
1
vote
0answers
77 views

Pandas df - FacetGrid - Need help with plotting [closed]

Let's say I have a df with the below columns ...
0
votes
1answer
59 views

Improve performance of SVM

I have written some code for an SVM and the final output isn’t brilliant. The data is linearly separable so I don’t understand why the data isn’t perfectly separated. Here is the code: ...
1
vote
1answer
44 views

What plt.subplots() doing here?

Below is the code I am trying to execute. x = np.random.normal(size=1000) fig, ax = plt.subplots() H = ax.hist(x, bins=50, alpha=0.5, histtype='stepfilled') Can ...
0
votes
1answer
256 views

Exporting Correlation Matrix (from function)

I'm interested in exporting a correlation matrix to csv. I've tried using the to.csv functionality, but my matrix is obtained from a function and I get an "object has no attribute 'to_csv'" error. I ...
3
votes
2answers
2k views

How can I draw bar graph in python on aggregated data?

Normally when I draw bar plot its simple as ...
0
votes
1answer
170 views

rectangular markers in bubble plot (Python)

I would like to make a 'bubble' plot, but with rectangular markers. Is it possible to do this in Python? On x-axis should be the day of the week (Mon, Tue, Wed,...), on y-axis - counts, how many ...
2
votes
0answers
3k views

Plotting multivariate linear regression

For practicing linear regression, I am generating some synthetic data samples as follows. First it generates 2000 samples with 3 features (represented by x_data). Then it generates "y" (results as ...
2
votes
1answer
7k views

Histogram plot with plt.hist()

I am a Python-Newbie and want to plot a list of values between -0.2 and 0.2. The list looks like this ...
1
vote
1answer
910 views

Validation curve unlike SKLearn sample

I'm trying to implement the validation curve based on this SKLearn tutorial. On the site, it shows how based on the parameters the model goes from under- to overfitted, finding the optimal parameter ...
4
votes
1answer
1k views

Correlation between specific columns of a data set

I have a CSV file which has 150 columns belonging to 7 categories but I want a correlation between 2 categories. The categories are movies and music, 12 and 19 columns respectively. Is there a way ...