12 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 ...
  • 1,186
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 ...
  • 14.1k
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. ...
  • 1,772
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 ...
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. ...
  • 2,410
5 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. ...
  • 1,751
5 votes

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

...
  • 1,153
5 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: ...
  • 8,667
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 ...
  • 3,770
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. ...
4 votes
Accepted

Scatter plot for binary class dataset with two features in python

Found the answer. Thank you @Aditya ...
  • 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 ...
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()
  • 2,129
3 votes

Validation curve unlike SKLearn sample

This is exactly your code just with digits data: ...
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: ...
  • 13.5k
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 ...
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. ...
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 ...
  • 1,769
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 ...
  • 13.5k
3 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 ...
  • 14.1k
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. ...
  • 293
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 ...
  • 780
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 ...
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 ...
  • 14.1k
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." ...
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)
  • 3,770
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 ...
3 votes
Accepted

Best way to visualize huge amount of data

I have three suggestions that may help. Reduce the point size Make the points highly transparent Downsample the points Since you do not provide any sample data, I will use some random data to ...
  • 293
3 votes
Accepted

Seaborn distplot and KDE data confusion

The difference is caused by the fact that seaborn.distplot and matplotlib.pyplot.hist use different defaults for the number of ...
  • 6,169
3 votes
Accepted

Plot dataframe with two columns on the x axis

Using matplotlib, you could create a custom tick formatter to show the right ticks. The year and month can either be fetched from the dataframe via the index (...
  • 146

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