Questions tagged [scatter]

A scatter plot is a type of mathematical diagram using Cartesian coordinates to display values for two variables for a set of data.

A scatter plot is a type of mathematical diagram using Cartesian coordinates to display values for two variables for a set of data.

943 questions
7
votes
2 answers

Correct way to (un)zip arrays in Julia

I was using the PyPlot library in Julia for plotting, and the scatter function seems to have a "little" inconvenience, namely, that only accepts the coordinates as two arguments: one array for all x values, and another for all y values,…
wpkzz
  • 839
  • 7
  • 23
7
votes
1 answer

Animation in matplotlib with scatter and using set_offsets: Autoscale of figure is not working

I'm using matplotlib plotting in python GUI using animation. And below is the code import sys from PyQt4 import QtGui from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import…
Anand
  • 343
  • 1
  • 5
  • 18
7
votes
1 answer

R - difference scatter plot

I was wondering if there is a way to subtract two binned scatter plots from one another in R. I have two distributions with the same axes and want to overlay one on top of the other and subtract them hence producing a difference scatter plot. Here…
EA00
  • 633
  • 8
  • 19
7
votes
3 answers

R plotly version 4.5.2 scatterplot legend bubble size settings

I am using plotly 4.5.2 in R. I have created a scatterplot which is sized on a variable, the issue is these sizes are also reflected in the legend which makes them hard to read. I want my graph to remain the same, with the only exception being the…
ZeroStack
  • 1,049
  • 1
  • 13
  • 25
7
votes
1 answer

Saving scatterplot animations with matplotlib produces blank video file

I am having a very similar problem to this question but the suggested solution doesn't work for me. I have set up an animated scatter plot using the matplotlib animation module. This works fine when it is displaying live. I would like to save it to…
user2175850
  • 193
  • 2
  • 13
6
votes
2 answers

graphing multiple types of plots (line, scatter, bar etc) in the same window

I'm trying to graph two types of plots in the same window (i.e. a line plot, and a scatter plot). The data being plotted in the line graph (first plot) are floating numerical values representing climate indices (Y) vs. decimal years (X). The second…
hdevs
  • 63
  • 1
  • 1
  • 4
6
votes
1 answer

Matplotlib: Group different scatter markers under the same legend

I have the following question about a Matplotlib plot. I am plotting data from different experiment as scatter plot; each of the set of data has its own marker and color. I would like to have them grouped in one single line of the legend because for…
Giovanni Frison
  • 628
  • 3
  • 19
6
votes
2 answers

Matplotlib: bring one set of scatter plot data to front

I have a series of subplots with red and blue markers, I am most interested in the red markers so want to bring them to the front of the plot: The data structure is like this: SzT Pcp Pcp_3day Pcp_7day Pcp_10day …
SHV_la
  • 875
  • 1
  • 10
  • 14
6
votes
1 answer

scatter plot with legend colored by group without multiple calls to plt.scatter

pyplot.scatter allows for passing to c= an array that corresponds to groups, which will then color the points based on those groups. However, this seems to not support generating a legend without specifically plotting each group separately. So, for…
dan_g
  • 2,712
  • 5
  • 25
  • 44
6
votes
1 answer

Add horizontal lines in categorical scatter plot using ggplot2 in R

I am trying to plot a simple scatter plot for 3 groups, with different horizontal lines (line segment) for each group: for instance a hline at 3 for group "a", a hline at 2.5 for group "b" and a hline at 6 for group "c". library(ggplot2) df <-…
Anna
  • 61
  • 1
  • 3
6
votes
1 answer

Matplotlib - plot with a different color for certain data points

My question is similar to this question. I am plotting latitude vs longitude. If the value in a variable is 0, I want that lat/long value to be marked with a different color. How do I do that? This is my attempt at it so far. Here x holds the…
Sarvavyapi
  • 810
  • 3
  • 23
  • 35
6
votes
2 answers

turn scatter data into binned data with errors bars equal to standard deviation

I have a bunch of data scattered x, y. If I want to bin these according to x and put error bars equal to the standard deviation on them, how would I go about doing that? The only I know of in python is to loop over the data in x and group them…
Griff
  • 2,064
  • 5
  • 31
  • 47
6
votes
1 answer

d3.js zoom/drag scatter plot

I'm working on a d3.js scatter plot and I want it to be zoomable without resizing the dots. I've based it on http://static.cybercommons.org/js/d3/examples/zoom-pan/zoom-pan.html which has working zoomable grid lines, but so far I'm having trouble…
richardwestenra
  • 948
  • 2
  • 10
  • 16
5
votes
3 answers

Write using mouse on R plot?

I created scattergram using the plot() function in R. Is there any possibility to draw on this graph? I would like to add a straight line and get parameters of it, but in my opinion abline() can be inconvenient (I would like to draw many lines and…
Mateusz
  • 71
  • 1
  • 2
5
votes
2 answers

Offset Plotly trace on x-axes

I'm trying to plot multiple categories on the same plot using add_trace(). Ideally, I would want the different traces to have a slight offset so that the markers don't overlap. I'm unable to figure how to achieve it. Here is an illustrative code,…
Hemanshu Das
  • 243
  • 4
  • 12
1 2
3
62 63