Visualizing Correlations with Scatter Plots
While correlation heatmaps offer a summary of linear relationships between variables, they can't be used to identify non-linear relationships. In these situations, scatter plots are more useful.
Why Use Scatter Plots?
Scatter plots are a simple yet powerful way to visualize the relationship between two numeric variables. They make it possible to detect both linear and non-linear trends, highlight outliers or anomalies, and provide deeper insight into relationships that might only appear abstractly in a correlation heatmap. By plotting individual data points, scatter plots give a clear and intuitive view of how variables interact.
Example: Selling Price vs. Max Power
A scatter plot can be used to examine how a car's power influences its market value. In this case, the x-axis represents maximum power, while the y-axis represents selling price.
ggplot(data = df, aes(x = max_power, y = selling_price)) +
geom_point() +
labs(title = "Scatter Plot of Selling Price vs. Max Power",
x = "Max Power",
y = "Selling Price")
This visualization makes it easy to see whether a positive linear relationship exists, where higher power generally corresponds to a higher selling price.
Thanks for your feedback!
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 4
Visualizing Correlations with Scatter Plots
Swipe to show menu
While correlation heatmaps offer a summary of linear relationships between variables, they can't be used to identify non-linear relationships. In these situations, scatter plots are more useful.
Why Use Scatter Plots?
Scatter plots are a simple yet powerful way to visualize the relationship between two numeric variables. They make it possible to detect both linear and non-linear trends, highlight outliers or anomalies, and provide deeper insight into relationships that might only appear abstractly in a correlation heatmap. By plotting individual data points, scatter plots give a clear and intuitive view of how variables interact.
Example: Selling Price vs. Max Power
A scatter plot can be used to examine how a car's power influences its market value. In this case, the x-axis represents maximum power, while the y-axis represents selling price.
ggplot(data = df, aes(x = max_power, y = selling_price)) +
geom_point() +
labs(title = "Scatter Plot of Selling Price vs. Max Power",
x = "Max Power",
y = "Selling Price")
This visualization makes it easy to see whether a positive linear relationship exists, where higher power generally corresponds to a higher selling price.
Thanks for your feedback!