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 ...
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 ...
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 ...
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.
...
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.
...
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.
...
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:
...
5
votes
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 ...
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
...
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 ...
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
...
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()
3
votes
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:
...
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 ...
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 ...
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.
...
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 ...
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 ...
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
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:
...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
matplotlib × 212python × 121
visualization × 63
pandas × 46
plotting × 40
seaborn × 31
machine-learning × 21
time-series × 12
numpy × 12
dataframe × 12
scikit-learn × 11
jupyter × 10
python-3.x × 9
clustering × 7
plotly × 7
graphs × 5
deep-learning × 4
dataset × 4
data-science-model × 4
k-means × 4
distribution × 4
ipython × 4
histogram × 4
classification × 3
keras × 3