Questions tagged [scatter-plot]

A scatter plot is a type of data visualization that reveals possible correlations between two variables. Data points are plotted on a two-dimensional plane using Cartesian coordinates. Use this tag if you have a programming question related to scatter plots, such as problems with computing or displaying the data. You should also tag which language or software libraries you are using.

A scatter plot is a type of mathematical diagram that reveals possible correlations between two variables. Data points are plotted on a two-dimensional plane using Cartesian coordinates. Series of points may be colorized to display additional data.

Link:

3562 questions
7
votes
2 answers

How to I create a labelled scatter plot?

I would like to draw a labelled scatterplot, like shown below, in Gadfly. (Source: http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/images/renda.png) How can I do this? The scatter plot is easy: using Gadfly X = [1, 2, 2, 3, 3,…
Frames Catherine White
  • 27,368
  • 21
  • 87
  • 137
7
votes
2 answers

How to plot multiple grouped data in one excel scatter plot with lines

I am facing some difficulties with plotting grouped data (by index) in one graph (scatter plot with lines) in Excel, and I will appreciate a lot your help. My data are in three columns: The first column is the index of the data or the group (i.e. a…
Leo...
  • 321
  • 2
  • 4
  • 14
7
votes
2 answers

R - add centroids to scatter plot

I have a dataset two continuous variables and one factor variable (two classes). I want to create a scatterplot with two centroids (one for each class) that includes error bars in R. The centroids should be positioned at the mean values for x and y…
cyril
  • 2,976
  • 5
  • 19
  • 26
7
votes
1 answer

Changing the color of the title in a ggplot

I have been working with this for some time and can't find any reasonable explanation for why the names of my x and y axis are the correct color, but not the title. p <- ggplot(movies, aes(x=budget, y=rating))+ geom_point(shape=1) + …
tumultous_rooster
  • 12,150
  • 32
  • 92
  • 149
7
votes
1 answer

How to plot a scatter plot using the histogram output in matplotlib?

I want to plot a scatter plot similar to this one : I can plot a histogram from my data but i want a scatter plot for the same data . Is there any way i can use the hist() method output as an input to scatter plot? or some other way is there to…
user1944257
  • 83
  • 1
  • 1
  • 5
7
votes
2 answers

d3.js scatter plot - zoom/drag boundaries, zoom buttons, reset zoom, calculate median

I've built a d3.js scatter plot with zoom/pan functionality. You can see the full thing here (click 'Open in a new window' to see the whole thing): http://bl.ocks.org/129f64bfa2b0d48d27c9 There are a couple of features that I've been unable to…
richardwestenra
  • 948
  • 2
  • 10
  • 16
7
votes
1 answer

Scatterplot with single regression line despite two groups using ggplot2

I would like to produce a scatter plot with ggplot2, which contains both a regression line through all data points (regardless which group they are from), but at the same time varies the shape of the markers by the grouping variable. The code below…
Doc
  • 358
  • 1
  • 4
  • 24
7
votes
4 answers

Adding labels to google scatter charts

I am using google charts API to draw scatter, is there a way to label each node in the scatter diagram. I guess it only uses the numeric values.....Any other tools I can use instead. Example: Name Age Response Allen 12 40 Tom 16 45 Sim …
jbcedge
  • 18,965
  • 28
  • 68
  • 89
6
votes
2 answers

Pylab: map labels to colors

I'm just starting with the scipy stack. I'm using the iris dataset, in a CSV version. I can load it just fine using: iris=numpy.recfromcsv("iris.csv") and plot it: pylab.scatter(iris.field(0), iris.field(1)) pylab.show() Now I'd like to also plot…
Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194
6
votes
1 answer

3D scatterplot colored by Z-Value

I've been googling for a while but couldn't find a solution for my problem. I am an amateur matlab user and I would like to create a 3D scatterplot, for this I have a matrix containing several points in 3D space: >> size(A) ans = 2511 …
florianbaethge
  • 2,520
  • 3
  • 22
  • 29
6
votes
1 answer

Color palette of seaborn scatterplot is not working

I am trying to use the sequential color brewer palette of seaborn scatter plot, but it does not work properly. This is what I have done so far. I would appreciate any help. import seaborn as sns from random import randrange y = [randrange(100) for…
fsrfyama
  • 325
  • 2
  • 13
6
votes
2 answers

How to use time as x axis for seaborn.scatterplot

I have a simple dataframe with the time as index and dummy values as example. I did a simple scatter plot as you see here: Simple question: How to adjust the xaxis, so that all time values from 00:00 to 23:00 are visible in the xaxis? The rest of…
juuubbb
  • 139
  • 4
  • 14
6
votes
1 answer

How to make 3D scatter plot color bar adjust to the Z axis size?

I have trying to visualize my data from pandas column as 3D scatter plot. I am facing the problem to adjust the color bar match to the exact size of my z axis. My code : import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D s =…
Mari
  • 698
  • 1
  • 8
  • 27
6
votes
2 answers

Add horizontal quantile lines to scatter plot ggplot2 R

I have eg data below eg_data <- data.frame( period = c(sample( c("1 + 2"), 1000, replace = TRUE)), max_sales = c(sample( c(1:10), 1000, replace = TRUE, prob = c(.05, .10, .15, .25, .25, .10, .05, .02, .02, .01))) I want to make a scatter (jitter,…
Adam_S
  • 687
  • 2
  • 12
  • 24
6
votes
1 answer

Display colorbar with a plot on mollweide projection

I try to do a scatterplot of lll and bbb variables with amplitudes as color with a mollweide projection with a colorbar. If I do import pylab as plt import numpy as…
AlbertBranson
  • 405
  • 2
  • 7