Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
1answer
29 views
2
votes
1answer
25 views

Ploting eigenvectors

I've generated two clouds of 3d points from multivariate_normal ...
2
votes
1answer
55 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
83 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
35 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
50 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: ...
0
votes
0answers
27 views

Change gradient rate in the plt.imshow()

I'm plotting image in the matplotlib. Rate of the value is shown with color. I want to change gradient of color that's shown in the plot. For example: From to
1
vote
1answer
19 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
97 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
29 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 ...
2
votes
1answer
2k 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
0answers
28 views

Annotating Matplotlib Plot with Dates

Here is the syntax for a project that I am working on in a Jupyter Notebook. I have aggregated the weekly flight delay into a Pandas Series and then plotted it using .plot(). I am trying to annotate ...
0
votes
3answers
3k 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
170 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
52 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
2k 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
1k 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 ...
0
votes
0answers
407 views

Python Seaborn Boxplot: Overlay 95 percentile values on whisker

I want to overlay 95 percentile values on seaborn boxplot. I could not figure out the ways to overlay text or if there is seaborn capability for that. How would I modify following code to overlay the ...
0
votes
0answers
20 views

Scatter Plot on Map within a Small Range (a university campus)

I am trying to get a scatter plot of points based on geolocation data superposed on a map. I have already went through several libraries like basemap or plotly which do similar stuffs. However, the ...
1
vote
0answers
21 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
68 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
22 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
286 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
124 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
59 views

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

Let's say I have a df with the below columns ...
0
votes
1answer
50 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
37 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
193 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
137 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 ...
1
vote
0answers
2k 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 ...
1
vote
1answer
5k 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
748 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 ...