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
1 answer

How to plot a 3D scatter with hyperplanes going through a point?

I mean something like the following two pictures combined: I need the hyperplanes to go through the point in row 3. I came up with some code, but it doesn't show any planes at all. Data = [3.95, 13.83, 4.12; 2.77, 15.34, 5.85; 4.41, 14.66, 5.548…
Steven
  • 105
  • 8
1
vote
2 answers

How can I chart 3d scatter graphs in C++?

What is the best way to chart a 3D scatter graph in C++? Or maybe it's easier to use an external programs. Can you recommend my anything?
YAKOVM
  • 9,805
  • 31
  • 116
  • 217
1
vote
1 answer

Why is my correlation plot output in vertical rows?

I'm trying to plot a basic correlation between two 7-point variables. I get a .72 correlation, but the data points are just one dot at every number point on the graph (like just dots equally spaced out into rows). I double checked to make sure the…
herzka
  • 13
  • 3
1
vote
1 answer

D3.js - X-axis not appearing on Scatterplot

I am trying to build a scatterplot by loading data from a .csv file. My scatterplot is trying to show Poverty (x-axis) vs. Healthcare (y-axis) for each state. Here's a snippet of the CSV file: id state healthcare poverty 1 Alabama …
Krithika Raghavendran
  • 457
  • 3
  • 10
  • 25
1
vote
1 answer

Average point and standard deviation bars on scatter plot

If I have a scatter plot like this MWE: import numpy as np import matplotlib.pyplot as plt np.random.seed(5) fig = plt.figure() ax = fig.add_subplot(111) xlist = [] ylist = [] for i in range(500): x = np.random.normal(100) xlist.append(x) …
Jim421616
  • 1,434
  • 3
  • 22
  • 47
1
vote
1 answer

TypeError: scatter() got multiple values for argument 'c'

I am trying to do hierarchy clustering on my MFCC array 'signal_mfcc' which is an ndarray with dimensions of (198, 12). 198 audio frames/observation and 12 coefficients/dimensions? I am using a random threshold of '250' with 'distance' for the…
1
vote
1 answer

How to display axis tick labels over plotted values using matplotlib and seaborn?

I am using matplotlib and seaborn in order to scatter plot some data contained in two arrays, x and y, (2-dimensional plot). The issue here is when it comes to displaying both axis labels over the data, because plotted data overlaps the values so…
alvarobartt
  • 453
  • 5
  • 15
1
vote
1 answer

text() in R on plot - how to keep on a single line without wrapping?

I often use R to run batch jobs that contain PDF outputs with scatter plots produced using a combination of plot() and points(), among other graphical functions. (I don't use ggplot2 much and would like to avoid using it for this question.) When…
1
vote
1 answer

How to calculate the alpha of overlapping points with a given transparency?

I have a scatterplot that overlays transparent points. I want to display what color a single point looks like, as well as what 5 overlapping points look like. Editted MWE and Answer alpha <- .2 gcol <- grey(0,alpha) plot(1:5,rep(1,5), pch=16,…
Jordan
  • 455
  • 6
  • 21
1
vote
1 answer

R plotly: Add text in polar scatter plot

Let's say I have a simple scatter plot using R plotly. And I want to put text at each points of scatter plot as shown. Simple R polar chart: library(plotly) p <- plot_ly( type = 'scatterpolar', r = c(0,1,2,2), theta = c(0,45,90,120), size =…
Om Sao
  • 7,064
  • 2
  • 47
  • 61
1
vote
1 answer

How to create a legend instead of a colorbar for a multicolored scatter plot?

I want to add a legend instead of a colorbar to a scatter plot with multiple colors. I am looking for something like this for a scatter plot. My current graphic looks like this: I was wondering if I could add a legend instead of a colorbar to the…
zorrolo
  • 117
  • 9
1
vote
2 answers

Differing Y Scale Between Two Limits

I would like to create a scatter plot that has only one Y-axis but on that axis has two scales set between different limits. The reason being, I have data that is densely populated near zero, but also has points that reach up to 2500. I would like…
lnathe
  • 37
  • 5
1
vote
1 answer

Add Legend for scatter plot

Below is the code for scatter plot. for_tsne = np.hstack((X_embedding, y.values.reshape(-1,1))) for_tsne_df = pd.DataFrame(data=for_tsne, columns= ['Dimension_x','Dimension_y','Labels']) colors = {0:'red',…
nkm
  • 53
  • 1
  • 8
1
vote
1 answer

How to plot multiple datasets on their own column on one scatter plot

I have 5 arrays that each contain 30 values. I want to plot each array on its own column in one scatter plot. So I want to end up with one scatter plot with 5 columns, each with 30 data points plotted in each column. I do NOT want the arrays to…
1
vote
1 answer

how to specify colours in scatterplot quadrants?

I'm looking to create a scatterplot within R that has points that are split into four quadrants and then applies a color to each quadrant based on group. I have used the following code which works, but need to change the colours. x_mid <-…