13 votes
Accepted

In elbow curve how to find the point from where the curve starts to rise?

TL;DR Use the two functions from below to get the index of the elbow: elbow_index = find_elbow(data, get_data_radiant(data)) **Edit:** I put all of the code below ...
georg-un's user avatar
  • 1,221
11 votes
Accepted

What do Python's pandas/matplotlib/seaborn bring to the table that Tableau does not?

Don't worry - your hard-earned Python skills are still important ;) Tableau is not a replacement - it is essentially a means of sharing your insights/findings. It is a wrapper around your normal ...
n1k31t4's user avatar
  • 14.7k
9 votes

How can I get rid of the white space in matplotlib?

This stackoverflow answer should solve your issue. You can use either plt.margins(x=0) or ax.margins(x=0) to remove all margins ...
Oxbowerce's user avatar
  • 7,157
7 votes
Accepted

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

You can use the seaborn package, using the scatterplot marker size to generate your bubbles. Then you need to loop over the datapoints and add a text labet to each point in your scatterplot. ...
TitoOrt's user avatar
  • 1,852
7 votes

What do Python's pandas/matplotlib/seaborn bring to the table that Tableau does not?

There is the official answer and the realistic answer (from a business perspective): Official Officially the greatest thing your Python skills will bring you is flexibility. If you are going to run ...
David Mulder's user avatar
6 votes

Scatter plot for binary class dataset with two features in python

One approach is to plot the data as a scatter plot with a low alpha, so you can see the individual points as well as a rough measure of density. ...
Aditya's user avatar
  • 2,460
6 votes
Accepted

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

Its because you have not looked how the values are packed in plt.subplot function. ...
Ankit Seth's user avatar
  • 1,821
6 votes
Accepted

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

Here is a working example to add a text to the right of horizontal bars: ...
Esmailian's user avatar
  • 9,247
5 votes

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

...
tuomastik's user avatar
  • 1,173
5 votes
Accepted

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 this do the trick? It depends what you want to understand or learn about your data. what does ...
n1k31t4's user avatar
  • 14.7k
5 votes
Accepted

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

You can use the Kolmogorov-Smirnov Test. From Wikipedia In statistics, the Kolmogorov–Smirnov test (K–S test or KS test) is a nonparametric test of the equality of continuous, one-dimensional ...
Tasos's user avatar
  • 3,890
5 votes

Could you explain if this plot is good or bad. It is a sentiment analysis modelusing LSTM layers

"Good" or "bad" is always relative in data science. You need to establish a benchmark for comparison. First of all, you need to know that accuracy is not a very good performance ...
Tripartio's user avatar
  • 153
4 votes

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

I don't know what you mean by "with linear model" in the title, but here's code that generates a toy dataset and replicates your plot. ...
John Rauser's user avatar
4 votes
Accepted

Scatter plot for binary class dataset with two features in python

Found the answer. Thank you @Aditya ...
Nitish's user avatar
  • 91
3 votes
Accepted

Twitter Retweet Network Visualization

For answering questions from graph, you should not visualize it. Visualizing graphs is for sake of having an overview on how it looks like in general. There are Graph Visualization techniques that ...
Kasra Manshaei's user avatar
3 votes
Accepted

How to add numbers to the axes of a graph?

Use xticks. e.g. x=np.arange(1,16) y = -60000*(3+np.log(1/x)) plt.plot(x,y,'b') plt.xticks(x) plt.show()
user12075's user avatar
  • 2,214
3 votes

Validation curve unlike SKLearn sample

This is exactly your code just with digits data: ...
Kasra Manshaei's user avatar
3 votes

Correlation between specific columns of a data set

I recommend you to use the following example and try to manipulate the arguments and adjust them for your work: ...
Green Falcon's user avatar
  • 13.9k
3 votes

How to plot clusters in nice a way?

Several options: Locally Linear Embedding (LLE): This method construct a set of local geometric patches on each of which a data point is reconstructed through the weighted sum of its K nearest ...
Kasra Manshaei's user avatar
3 votes

How to plot clusters in nice a way?

T-SNE is another dimensionality reduction algorithm not mentioned in the article in the other answer. Used for VERY high dimensional data, if you have trained some embeddings for your dataset. ...
Pavel Savine's user avatar
3 votes

How to create a historical timeline using Pandas Dataframe and matplotlib

Sorry for the late reply. I don't know whether the below kind of plot suffices for what you are looking. If yes is the case, you might like matplotlib.hlines. I ...
Kiritee Gak's user avatar
  • 1,789
3 votes
Accepted

What plt.subplots() doing here?

As you can read from here plt.subplots() is a function that returns a tuple containing a figure and axes object(s). Thus when using ...
Green Falcon's user avatar
  • 13.9k
3 votes
Accepted

Name of this type of cross variable interaction Plot

Here is python code to make a pretty good match for your picture. ...
G5W's user avatar
  • 303
3 votes
Accepted

Histogram is extremely skewed to the left

I think there are a few "easy wins" here. You might add more bins - you are already using the bin setting. Just add something high like 100 or even 1000 to get a first feeling for the data You can ...
El Burro's user avatar
  • 790
3 votes
Accepted

How can I get variable values from a plot?

It seems what you are looking for is a function of your data, not of matplotlib. I would think of this as a second derivative problem -- you care about differences ...
Andrew Maurer's user avatar
3 votes

Is my iPython Installation Valid?

It looks fine to me :) the only problem is that your plot (resulting from In [18]) is being displayed on your computer in a separate window somewhere - maybe you ...
n1k31t4's user avatar
  • 14.7k
3 votes
Accepted

Making Inference from a Correlation Heatmap

Assuming you're using df.corr(), the results from a heatmap are Pearson correlation coefficients which can be thought of as "the explainability between two arrays." ...
Yaakov Bressler's user avatar
3 votes
Accepted

Seaborn subplots massive whitespace

You can move the title closer to the first figure. Just add the following two lines at the end of the code fig.tight_layout() fig.subplots_adjust(top=0.95)
Tasos's user avatar
  • 3,890
3 votes

How do I change the marker edge color of a seaborn relplot?

The issue was with the parameter I was using. The parameter "edgecolors" is incorrect. The correct parameter is the non-plural "edgecolor". So the correct call to relplot is: ...
Russell Gould's user avatar
3 votes
Accepted

How to creat a plot for the accuracy of a model

Your context is different than the one provided in the link. There, the author has made a neural network in Keras and has plotted the accuracy against the number of epochs. One epoch is when an entire ...
Keshav Garg's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible