As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [data-visualization]

Constructing and interpreting meaningful and useful graphical representations of data. (If your question is only about how to get particular software to produce a specific effect, then it is likely not on topic here.)

Filter by
Sorted by
Tagged with
236 votes
4 answers

How to interpret a QQ plot

I am working with a small dataset (21 observations) and have the following normal QQ plot in R: Seeing that the plot does not support normality, what could I infer about the underlying distribution? ...
JohnK's user avatar
  • 19.4k
117 votes
4 answers

Assessing approximate distribution of data based on a histogram

Suppose I want to see whether my data is exponential based on a histogram (i.e. skewed to the right). Depending on how I group or bin the data, I can get wildly different histograms. One set of ...
guestoeijreor's user avatar
113 votes
11 answers

"Best" series of colors to use for differentiating series in publication-quality plots

Has any study been done on what are the best set of colors to use for showing multiple series on the same plot? I've just been using the defaults in matplotlib, ...
Daisy Sophia Hollman's user avatar
101 votes
1 answer

Interpreting plot.lm()

I had a question about interpreting the graphs generated by plot(lm) in R. I was wondering if you guys could tell me how to interpret the scale-location and leverage-residual plots? Any comments ...
Guest's user avatar
  • 1,011
89 votes
4 answers

How to produce a pretty plot of the results of k-means cluster analysis?

I'm using R to do K-means clustering. I'm using 14 variables to run K-means What is a pretty way to plot the results of K-means? Are there any existing implementations? Does having 14 variables ...
JEquihua's user avatar
  • 3,553
84 votes
4 answers

How to visualize what canonical correlation analysis does (in comparison to what principal component analysis does)?

Canonical correlation analysis (CCA) is a technique related to principal component analysis (PCA). While it is easy to teach PCA or linear regression using a scatter plot (see a few thousand examples ...
figure's user avatar
  • 943
80 votes
12 answers

Famous statistical wins and horror stories for teaching purposes

I am designing a one year program in data analysis with a local community college. The program aims to prepare students to handle basic tasks in data analysis, visualization and summarization, ...
73 votes
3 answers

How to actually plot a sample tree from randomForest::getTree()? [closed]

Anyone got library or code suggestions on how to actually plot a couple of sample trees from: getTree(rfobj, k, labelVar=TRUE) (Yes I know you're not supposed ...
smci's user avatar
  • 1,472
69 votes
3 answers

When are Log scales appropriate?

I've read that using log scales when charting/graphing is appropriate in certain circumstances, like the y-axis in a time series chart. However, I've not been able to find a definitive explanation as ...
dav's user avatar
  • 1,541
67 votes
9 answers

How to visualize what ANOVA does?

What way (ways?) is there to visually explain what is ANOVA? Any references, link(s) (R packages?) will be welcomed.
Tal Galili's user avatar
  • 20.8k
62 votes
12 answers

Software needed to scrape data from graph [closed]

Anybody have any experience with software (preferably free, preferably open source) that will take an image of data plotted on cartesian coordinates (a standard, everyday plot) and extract the ...
59 votes
2 answers

How can I change the title of a legend in ggplot2? [closed]

I have a plot I'm making in ggplot2 to summarize data that are from a 2 x 4 x 3 celled dataset. I have been able to make panels for the 2-leveled variable using ...
russellpierce's user avatar
58 votes
7 answers

Graph for relationship between two ordinal variables

What is an appropriate graph to illustrate the relationship between two ordinal variables? A few options I can think of: Scatter plot with added random jitter to stop points hiding each other. ...
57 votes
13 answers

Visually interesting statistics concepts that are easy to explain

I noticed on Math Stack Exchange a terrific thread which highlighted a number of very visually interesting math concepts. I would be curious to see graphics/gifs which anyone has that very clearly ...
57 votes
1 answer

How to determine whether or not the y-axis of a graph should start at zero?

One common way to "lie with data" is to use a y-axis scale that makes it seem as if changes are more significant than they really are. When I review scientific publications, or students' lab reports, ...
ff524's user avatar
  • 787
56 votes
6 answers

How to determine best cutoff point and its confidence interval using ROC curve in R?

I have the data of a test that could be used to distinguish normal and tumor cells. According to ROC curve it looks good for this purpose (area under curve is 0.9): My questions are: How to ...
Yuriy Petrovskiy's user avatar
56 votes
4 answers

How to visualize a fitted multiple regression model?

I am currently writing a paper with several multiple regression analyses. While visualizing univariate linear regression is easy via scatter plots, I was wondering whether there is any good way to ...
Shawn Wang's user avatar
  • 1,345
56 votes
9 answers

Modern successor to Exploratory Data Analysis by Tukey?

I've been reading Tukey's book "Exploratory Data Analysis". Being written in 1977, the book emphasizes paper/pencil methods. Is there a more 'modern' successor which takes into account that we can ...
56 votes
3 answers

How do I find peaks in a dataset?

If I have a data set that produces a graph such as the following, how would I algorithmically determine the x-values of the peaks shown (in this case three of them):
nonaxiomatic's user avatar
54 votes
5 answers

R - QQPlot: how to see whether data are normally distributed

I have plotted this after I did a Shapiro-Wilk normality test. The test showed that it is likely that the population is normally distributed. However, how to see this "behaviour" on this plot? ...
Le Max's user avatar
  • 3,689
54 votes
3 answers

Suppression effect in regression: definition and visual explanation/depiction

What is a suppressor variable in multiple regression and what might be the ways to display suppression effect visually (its mechanics or its evidence in results)? I'd like to invite everybody who has ...
ttnphns's user avatar
  • 55.1k
54 votes
4 answers

Would PCA work for boolean (binary) data types?

I want to reduce the dimensionality of higher order systems and capture most of the covariance on a preferably 2 dimensional or 1 dimensional field. I understand this can be done via principal ...
Alvin Nunez's user avatar
51 votes
2 answers

PP-plots vs. QQ-plots

What is the difference between probability plots, PP-plots and QQ-plots when trying to analyse a fitted distribution to data?
kay's user avatar
  • 641
51 votes
9 answers

Does anyone know any good open source software for visualizing data from database?

Recently I came across Tableau and tried to visualize the data from database and csv file. The user iterface enables the user to visualize time and spatial data and create plots in an instant. Such ...
niko's user avatar
  • 1,353
50 votes
17 answers

What is your favorite data visualization blog?

What is the best blog on data visualization? I'm making this question a community wiki since it is highly subjective. Please limit each answer to one link. Please note the following criteria for ...
48 votes
6 answers

How do I avoid overlapping labels in an R plot? [closed]

I'm trying to label a pretty simple scatterplot in R. This is what I use: plot(SI, TI) text(SI, TI, Name, pos=4, cex=0.7) The result is mediocre, as you can see (...
slhck's user avatar
  • 827
47 votes
4 answers

How to interpret mean of Silhouette plot?

Im trying to use silhouette plot to determine the number of cluster in my dataset. Given the dataset Train , i used the following matlab code ...
Learner's user avatar
  • 4,337
47 votes
8 answers

How to do community detection in a weighted social network/graph?

I'm wondering if someone could suggest what are good starting points when it comes to performing community detection/graph partitioning/clustering on a graph that has weighted, undirected edges. The ...
laramichaels's user avatar
  • 1,139
46 votes
10 answers

How to plot trends properly

I am creating a graph to show trends in death rates (per 1000 ppl.) in different countries and the story that should come from the plot is that Germany (light blue line) is the only one whose trend is ...
PhDing's user avatar
  • 2,610
46 votes
6 answers

What is your favorite statistical graph?

This is a favorite of mine This example is in a humorous vein (credit goes to a former professor of mine, Steven Gortmaker), but I am also interested in graphs that you feel beautifully capture and ...
45 votes
16 answers

What best practices should I follow when preparing plots?

I usually make my own idiosyncratic choices when preparing plots. However, I wonder if there are any best practices for generating plots. Note: Rob's comment to an answer to this question is very ...
41 votes
4 answers

For plotting with R, should I learn ggplot2 or ggvis?

For plotting with R, should I learn ggplot2 or ggvis? I don't necessarily want to learn both if one of them is superior in any regard. Why R community keeps creating new packages with overlapping ...
qazwsx's user avatar
  • 727
41 votes
2 answers

Interpretation of plot (glm.model)

Can anyone tell me how to interpret the 'residuals vs fitted', 'normal q-q', 'scale-location', and 'residuals vs leverage' plots? I am fitting a binomial GLM, saving it and then plotting it.
Summer's user avatar
  • 411
41 votes
3 answers

What test can I use to compare slopes from two or more regression models?

I would like to test the difference in response of two variables to one predictor. Here is a minimal reproducible example. ...
Abe's user avatar
  • 3,781
40 votes
4 answers

Why use colormap viridis over jet?

As announced in, Matplotlib changes the default colormap from jet to viridis. However, I don't understand it pretty well. Maybe because I'm color blind? ...
ZK Zhao's user avatar
  • 1,255
39 votes
8 answers

Graphical data overview (summary) function in R

I'm sure I've come across a function like this in an R package before, but after extensive Googling I can't seem to find it anywhere. The function I'm thinking of produced a graphical summary for a ...
robintw's user avatar
  • 2,087
38 votes
5 answers

How to visualize/understand what a neural network is doing?

Neural networks are often treated as "black boxes" due to their complex structure. This is not ideal, as it is often beneficial to have an intuitive grasp of how a model is working internally. What ...
rm999's user avatar
  • 758
37 votes
4 answers

Experimental evidence supporting Tufte-style visualizations?

Q: Does there exist experimental evidence supporting Tufte-style, minimalist, data-speak visualizations over the chart-junked visualizations of, say, Nigel Holmes? I asked how to add chart-junk to R ...
lowndrul's user avatar
  • 2,097
37 votes
2 answers

When is t-SNE misleading?

Quoting from one of the authors: t-Distributed Stochastic Neighbor Embedding (t-SNE) is a (prize-winning) technique for dimensionality reduction that is particularly well suited for the ...
Frames Catherine White's user avatar
36 votes
2 answers

Interpretation of biplots in principal components analysis

I came across this nice tutorial: A Handbook of Statistical Analyses Using R. Chapter 13. Principal Component Analysis: The Olympic Heptathlon on how to do PCA in R language. I don't understand the ...
user862's user avatar
  • 2,539
35 votes
7 answers

Statistical methods to more efficiently plot data when millions of points are present?

I find R can take a long time to generate plots when millions of points are present - unsurprising given that points are plotted individually. Furthermore, such plots are often too cluttered and dense ...
Alex Stoddard's user avatar
35 votes
2 answers

Is there a boxplot variant for Poisson distributed data?

I'd like to know if there is a boxplot variant adapted to Poisson distributed data (or possibly other distributions)? With a Gaussian distribution, whiskers placed at L = Q1 - 1.5 IQR and U = Q3 + 1....
caas's user avatar
  • 535
35 votes
3 answers

Datasets constructed for a purpose similar to that of Anscombe's quartet

I've just come across Anscombe's quartet (four datasets that have almost indistinguishable descriptive statistics but look very different when plotted) and I am curious if there are other more or less ...
35 votes
2 answers

Performing a statistical test after visualizing data - data dredging?

I'll propose this question by means of an example. Suppose I have a data set, such as the boston housing price data set, in which I have continuous and categorical variables. Here, we have a "quality"...
Marcel's user avatar
  • 1,320
35 votes
2 answers

How to plot decision boundary of a k-nearest neighbor classifier from Elements of Statistical Learning?

I want to generate the plot described in the book ElemStatLearn "The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Second Edition" by Trevor Hastie & Robert Tibshirani&...
littleEinstein's user avatar
34 votes
6 answers

Line graph has too many lines, is there a better solution?

I'm trying to graph the number of actions by users (in this case, "likes") over time. So I have "Number of actions" as my y-axis, my x-axis is time (weeks), and each line represents one user. My ...
regulatethis's user avatar
34 votes
3 answers

What distribution does my data follow?

Let us say that I have 1000 components and I have been collecting data on how many times these log a failure and each time they logged a failure, I am also keeping track of how long it took my team to ...
Legend's user avatar
  • 4,402
34 votes
2 answers

What does an Added Variable Plot (Partial Regression Plot) explain in a multiple regression?

I have a model of Movies dataset and I used the regression: ...
Abhishek Choudhary's user avatar
33 votes
3 answers

Visualizing a million, PCA edition

Is it possible to visualize the output of Principal Component Analysis in ways that give more insight than just summary tables? Is it possible to do it when the number of observations is large, say ~...
gappy's user avatar
  • 5,460
33 votes
5 answers

Color and line thickness recommendations for line plots

Much has been written about color blind-friendly color choices for maps, polygons, and shaded regions in general (see for example I have not been able to find ...
Frank Harrell's user avatar

2 3 4 5