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
1
vote
2 answers

How to determine which `x` argument to use for K-means and scatter plots?

I'm trying to implement and visualize a K-means algorithm code in Python. I have a dataset I created using make_blobs, then I fit the data with K-means and visualize the results using matplotlib.pyplot.scatter. Here's my code: Importing and data…
Sean
  • 2,890
  • 8
  • 36
  • 78
1
vote
0 answers

How to insert text labels to data points (not in the data) using panel.text() in a lattice plot

I created a scatterplot from the data (see rcode and data below). The y-axis shows the mean rate of sapflow measured from the xylem in trees during transpiration and the x-axis shows the mean ambient temperature. Within the scatterplot, 5 points…
Alice Hobbs
  • 1,021
  • 1
  • 15
  • 31
1
vote
1 answer

apply transparent background to divide plot area based on x values using ggplot

I would appreciate any help to apply the transparent background colours below to divide into two parts the plot area based on x-values as illustrated in the plot below (vertical division). Here are my sample data and code: mtcars$cyl <-…
Krantz
  • 1,424
  • 1
  • 12
  • 31
1
vote
1 answer

What is the difference between the plot at the upper right and the one at the lower left corner when using scatterplotMatrix in the car library?

Why are the regression lines different for the plot at the upper right and the one at the lower left(image attached) corner when using scatterplotMatrix in the car library? Both seem to mark the same points with the axis interchanged. Why then are…
1
vote
1 answer

add legend to dc.js scatterplot

Somewhat related to this question. I would like to add a legend to a scatterplot using dc.js, ideally with the possibility of highlighting points based on hover/click of the corresponding legend. The source code seems to indicate that color is…
M.T
  • 4,917
  • 4
  • 33
  • 52
1
vote
1 answer

Scatter plot using colormap and individual alpha values

There are two similar questions about this: Individual alpha values in scatter plot Add alpha to an existing matplotlib colormap but neither of these address this issue. I need to produce a scatter plot with individual alphas (as in question 1.)…
Gabriel
  • 40,504
  • 73
  • 230
  • 404
1
vote
2 answers

ggplot2 Geom_Plot R labeling points in scatter plot

How would I label the points in this scatter plot using numbers instead of colors? Below is the code I am using, instead of the legend saying what color is related to what change I would like it to use numbers. It's hard to tell what color it is…
Dalton
  • 23
  • 3
1
vote
2 answers

XY Plotting column data grouped on other column

I have a very large data set with two columns which relate as below. df <- data.frame( group = c("123-4", "123-4", "234-5", "234-5", "345-6", "345-6"), age = c(38, 41, 65, 67, 78, 23)) group age 123-4 38 123-4 41 234-5 65 234-5 67 345-6…
Bruce
  • 113
  • 8
1
vote
0 answers

3D scatter plot with million points, rotate and zoom it

Currently I am using mpl_toolkits.mplot3d with ~100k points. However, rotating the graph is very time-costly and zooming is impossible. Does anyone have suggestions on how to fix these problems?
1
vote
1 answer

How to add constant line to animated plot in plotly

I am using plotly package in R and need to make an animated plot which combines data from my dataset with constant tresholds that are not connected to data in the dataset. The code works fine without frame (the plot is not animated in this case).…
Aleksander
  • 37
  • 4
1
vote
1 answer

d3.js legend overlapping chart area

I'm pretty new to D3.js (I'm a R programmer). I'm trying to create a scatter and put a legend in the right bottom. However, it's overlapping with chart area. I've been trying to take some examples in internet with no lucky. When I try to move it to…
patL
  • 2,259
  • 1
  • 17
  • 38
1
vote
0 answers

Reading dataset and producing multiple scatter subplots

I have the following data (dataset name is 'data' in the code below) and code. So far my code plots one scatterplot at a time; I need to change the company name manually if I am to get a specific scatterplot for a specific company. I am looking to…
maroulator
  • 129
  • 8
1
vote
1 answer

proportion between two features in a scatter plot

I have a dataset: almost 45K samples 8 features 4 classes The percentage of samples for each class is different. I wanted to draw all scatter charts for each combination's pair, that's to say, 28 charts and by considering all dataset. So at the…
Alex
  • 67
  • 1
  • 8
1
vote
2 answers

How to import "gleam" package in Python 3?

I'm tyring to import the "gleam" package in Python 3. I have installed the "gleam" package successfully, but still it showing error. from wtforms import fields from ggplot import * from gleam import Page, panels class ScatterInput(panels.Inputs): …
David
  • 366
  • 3
  • 22
1
vote
2 answers

Turn plot around in R

Currently I am doing research to chatbot interfaces and make use of eyetracking to test my prototypes. My eyetracking device creates a csv file with a x and a y coordinate every 16 mili seconds. I want to plot this information with: The X-axis on…
jorenwouters
  • 105
  • 1
  • 1
  • 8