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

r plot() plots a box plot instead of a xy plot

I'm using the plot() function in rstudio for deploying a xy plot... but what's displayed looks like an odd, unsorted boxplot. Here is the code I use: file = "/Users/Mike/OneDrive - Quantium/Training/Stanford/Chapter…
1
vote
1 answer

Memory-speed issues when doing a scatter plot in Matlab

I have the following memory-speed problem in Matlab and I would like your help to understand whether there may be a solution. Consider the following 4 big column vectors X1, X2, Y1, Y2. clear rng…
TEX
  • 2,249
  • 20
  • 43
1
vote
2 answers

Text labels in scatterplot not overlapping trend line in r (ggplot)

I am trying to create a scatterplot using ggplot. Is there a way to stop my text labels from overlapping the trend line? I was only able to stop overlapping the text labels from each other. rownames = c("dummy", "dummy", "dummy", "dummy", "dummy",…
Sarah
  • 137
  • 9
1
vote
0 answers

sns.relplot change figure size

How do I change the figure size and the style of sns.relplot? I wrote: ## Load in packages import pandas as pd import numpy as np import scipy.stats as stats import matplotlib.pyplot as plt %matplotlib inline import seaborn as…
aks85
  • 695
  • 3
  • 11
  • 24
1
vote
1 answer

Make scatterplot from arrays within a dataframe

Let's say I have the following dataframe, for each month separately I have a bunch of data, stores in arrays for three variables : ID Y X1 X2 month 0 [2,4,6,8] [2,4,6,8] [2,4,6,8] 01 1 [Nan,4,6,8] [1,3,5,4] [4,3,3,3] …
Christin Abel
  • 301
  • 1
  • 3
  • 10
1
vote
2 answers

Beginner question: Python scatter plot with normal distribution not plotting

I have an array of random integers for which I have calculated the mean and std, the standard deviation. Next I have an array of random numbers within the normal distribution of this (mean, std). I want to plot now a scatter plot of the normal…
Py_Student
  • 163
  • 1
  • 12
1
vote
1 answer

ggplot2: can geom_point work in melted dataframes?

I am kind of beginner in ggplot2. I have this dataframe: df <- data.frame(testno = 1:4, y1 = c(1.2,3.1,4.6,6.7), y2 = c(5,3.2,9.6,8.8)) df$testno <- factor(df$testno) from which I can easily plot: ggplot(df, aes(x = y1, y=y2)) + geom_point() I…
Alex.z
  • 15
  • 3
1
vote
1 answer

Creating multi colored scatterplot in Python

I have a pandas dataframe that has data I want to plot, but I'd like to change the color of the dot based on the sex of the animal. I've tried a bunch of different ways to get this to work. First I tried to index a dictionary based on the df column…
1
vote
2 answers

Which is the equivalen to seaborn hue in ggplot?

I'm starting to program in R and I'm getting stuck in this plot. This is the plot I'm traying to make: I'm able to do it with this code: x <- seq(0, 10,1 ) y = x**2 z= x**3 plot(x, y, type="o", col="blue",xlab='x',ylab="y =…
Luis Ramon Ramirez Rodriguez
  • 9,591
  • 27
  • 102
  • 181
1
vote
0 answers

python scatter plot x axis months instead on many dates

I am trying to make a scatter plot that has hourly data of some value on y axis and each hourly data has a corresponding date (24 same dates for a day) as x axis value. When I plot this, the x axis seems too "crowded" and it becomes a black line. I…
Andraxyz
  • 33
  • 6
1
vote
0 answers

Scatter plot using ggscatter for unequal x and y

I have a data frame like this(showing a part of big data frame) cell1 0.33 0.003 cell1_sig cell1 -0.23 0.002 cell1_sig cell1 0.21 0.08 cell1_nonsig cell2 0.87 0.0001 cell2_sig cell2 0.1 0.10 cell2_nonsig I want…
user3138373
  • 519
  • 1
  • 6
  • 18
1
vote
1 answer

Pandas scatter_matrix plotting - additional arguments

I am running Python 3.6 with Pandas version 0.19.2. On the code example below, I have two questions regarding the Pandas plotting function scatter_matrix(): **1.**How can I colour-label the observations in the scatter plots with respect to the Label…
Zhubarb
  • 11,432
  • 18
  • 75
  • 114
1
vote
1 answer

How to draw x=y line in OriginPro

Does anyone know how to draw an exact x=y line in OriginPro scatter plot? I already looked into the Internet and OriginPro forums with no exact solution. Many thanks in advance.
rk85
  • 57
  • 2
  • 6
1
vote
0 answers

D3js V4 - How to zoom scatter plot matrix chart

I'm a freshman using js and d3. How can I zoom a scatter plot matrix chart? What I did, I used svg to show the scatter plot matrix, following the example https://bl.ocks.org/Fil/6d9de24b31cb870fed2e6178a120b17d Since the performance was too bad…
qingdaojunzuo
  • 416
  • 1
  • 3
  • 13
1
vote
1 answer

TypeError with Python : str and int

I received this error when trying to compile my code. I extracted data from xlsx file and created a dataframe ,replaced null values with 0, converted all the values to sting to be able to scatterplot and when i tried to show the results of my linear…
Ahmed Achour
  • 105
  • 1
  • 11