Questions tagged [scatter-plot]

0

votes
1

answer
14

Views

Seaborn and mplcursors

I have some data that I want to plot on a scatter chart, and display the associated label for each point. The data looks like xlist=[1,2,3,4] ylist=[2,3,4,5] labels=['a', 'b', 'c', 'd'] I can plot using Seaborn and tried to use mplcursor, but the displayed labels are the x and y instead of labels....
daydayup
1

votes
1

answer
1.2k

Views

How to set alpha for the smoothing line in ggplot [duplicate]

This question already has an answer here: Control transparency of smoother and confidence interval 1 answer I am using alpha to set transparency for the smoothing line in ggplot but instead I get transparency only in the Error band that surrounds the fitted line. My code is the following: z1
rf7
1

votes
1

answer
58

Views

Adding barchart into tooltip of scatterChart in nvd3 - react component not rendering

I created a scatterChart from nvd3 and then tried to customize the tooltip the way it is described here: nvd3 piechart.js - How to edit the tooltip? using chart.tooltip.contentGenerator() approach: import React from 'react' import * as d3 from 'd3'; import nvd3 from 'nvd3'; var nv = nvd3; import Bar...
Nikita Vlasenko
1

votes
0

answer
105

Views

Show specific plane (XY) in plotly 3D Scatterplot in R

With showgrid = TRUE for x-axis and y-axis, is there any way to get rid of the VERTICAL lines extending from the x and y-axis so that there is a single plane showing? library(plotly) itemName = c('Alpha', 'Bravo', 'Charley', 'Delta', 'Echo', 'Foxtrot') security = c(0.8583241, 0.7516891, 0.5390520,...
craab
1

votes
1

answer
53

Views

generate series of plots with pandas dataframe

I have to generate a series of scatter plots (roughly 100 in total). I have created an example to illustrate the problem. First do an import. import pandas as pd Create a pandas dataframe. # Create dataframe data = {'name': ['Jason', 'Jason', 'Tina', 'Tina', 'Tina', 'Jason', 'Tina'], 'report_valu...
Marnix
1

votes
1

answer
155

Views

c3 charts dynamic bubble size in scatter plot, wrong index

I'm trying to make a chart like with c3.js. For the bubble size I create an array for each 'continent' holding the population as a factor to increase the bubble size. Also the country name is stored in the same manner. When adding the data points to the chart as well as when adding the bubble sizes...
haferblues
1

votes
1

answer
249

Views

Python scatterplot design - select specific values of a variable for the x axis based on another columns values

I am relatively new to python and am currently trying to generate a scatterplot based off of some data using pandas & seaborn. The data I'm using ('ErrorMedianScatter') is as follows (apologies for the link, I have yet to get permissions to embed images!): Image of data Each participant has two dat...
MDhar94
1

votes
1

answer
301

Views

Pick color or symbol of marker in Plotly r on a group by condition

+----+------+-------+ | Id | Time | Value | +----+------+-------+ | 1 | A | 1 | | 2 | B | 10 | | 2 | C | 3 | | 2 | D | 6 | | 3 | E | 2 | | 4 | F | 9 | | 4 | G | 4 | | 4 | H | 17 | +----+------+-------+ I have data like above (simplified)....
Viswanath Ramanan
1

votes
1

answer
41

Views

Excel VBA macro for extracting column numbers from plots

I often make a lot of scatter plots (column j vs column i) in a single Worksheet. I want to export them as png/jpg files. Each plot would need a sensible file name. I have thought that the file name could be something like plot_[column i]_[column j].png. How do I get the column (like C or AE) from...
user6439024
1

votes
0

answer
109

Views

word(s) frequency scatterplot or comparing word clouds in R

I have individual level causes of death data (from the 19th century) and want to compare the frequencies between males and females, either using scatterplots or comparing word clouds. I have manage to do this by using the following command (exemplified for comparing Word clouds): all=c(female,male)...
Sommerseth
1

votes
1

answer
38

Views

Color scatterplot points based on rank

I have a scatterplot of mtcars and I was wondering if there is way to specify the color of the points corresponding to the maximum and minimum mpg values. I guess a broader way to ask the question would be is there a way to assign point color based on subgroups, ie 3 most efficient cars in green and...
regents
1

votes
1

answer
55

Views

dc.js scatterplot is slow with a lot of data - any alternative implementations?

I am using the scatterplot type in dc.js. It does a great job but whenever I go beyond 10k points it becomes very laggy and loses the smoothness I'm used to in dc.js. Is there an alternative implementation of this plot within dc.js or will I have to resort to using a different library for that one ?...
Chapo
1

votes
1

answer
45

Views

c3 (v4) scatter plot with two sets of data

I have the following csv file to plot two different sets of data: normal and global with its respective regression. Access grade global,Grade_global,Regression_global,Access grade,Grade,Regression 11.48,6.0,5.66,11.48,6.0,5.74 11.43,5.6,5.63,11.43,5.6,5.69 12.13,5.9,6.16,12.13,5.9,6.55 10.48,5.0,4....
MTT
1

votes
0

answer
45

Views

Plot joint return period

I have two variables var1 and var2. I want to have joint return period plot of two variables like The blue line indicates the joint return period of two variables and the number indicate the return period value in years(1,5,10,50,...). I am not sure how to generate this plot. set.seed(101) dates =...
user3978632
1

votes
0

answer
144

Views

D3.js / How to draw multi-series plot with an array of data from a JSON file?

I want to program a scatter plot graph like this one https://bl.ocks.org/MettiHoof/raw/4ec91624da6f642004e6167184ff8250/ (with time in axis) But I'm blocked on my data extraction. This is my JSON datas, I need to extract 28 temperatures list and draw them for one date: { 'Session_test': [{ 'datas_...
Patrick Michel
1

votes
1

answer
162

Views

R - Make a scatterplot look like a dotplot with counts above and below zero

I'm just learning with R so there's probably an easier way to do this. I have a table of data that shows a set of stores with their change in market share over the same period a year ago. I've included a link to the first two periods worth of data. Sample Data I currently have a scatterplot that l...
Brad
1

votes
0

answer
69

Views

Writing a text with scatter plot points

Ok, this is a bit of a funky idea, but is it possible to generate a dataset of points that, when plotted, display a desired text? I remember seeing this somewhere, but have no idea how to do it.
Qubix
1

votes
1

answer
400

Views

How to give the markers in the pyplot scatter plot a custom RGB color?

I'm using the scatter function from the matplotlib.pyplot library to visualize certain data in a 3D scatter plot. This function, Link to documentation , has an argument called 'c' which can be used to give the marker a particular color. They note that the argument given for 'c' can be a RGB code st...
1

votes
1

answer
45

Views

Remove long row of data points in Matlab

I have a list of coordinates, coord, which looks like this when plotted: I want to remove the long string of points that goes completely from 0 to 1 from the data set, shown on this plot starting at (0, 11) and ending at (1, 11) and the other one that begins at (0, 24) and ends at (1, 28). So far,...
kmarx
1

votes
0

answer
100

Views

I am trying to plot clusters with unique color but getting error

I am just trying to plot x, y and then color them with clusters. Each cluster should have unique color. But i am getting error. I tried without using numpy array but still getting error. ' c of shape (5113,) not acceptable as a color sequence for x with size 5113, y with size 5113'' x = np.array(df...
Sandeep Shahi
1

votes
0

answer
78

Views

How to make a 3D plot with surfaces

I am trying to make a 3D plot with surfaces in R, something similar to this. The above plot is generated using Matlab (https://uk.mathworks.com/matlabcentral/answers/264427-making-10-2d-slices-out-of-3d-plot). I created a 3D scatter plot in Plotly, but now I need to create a landscape out of it for...
johnsmith0
1

votes
2

answer
70

Views

VBA for loop using the counter integer to retrieve content from cells

I'm really a beginner with VBA macros and their syntax so bear with me please. I have been trying to assign content from specific cells to labels in a scatter plot. Started out by recording my own manual assignment and 'cleaning' that code. Works fine for the sample set I'm using right now. Sub Rena...
T. Buc
1

votes
0

answer
125

Views

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 when the records over 10 thousands and the matrix size...
qingdaojunzuo
1

votes
1

answer
32

Views

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
1

votes
0

answer
50

Views

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 to create a scatter plot between cell1 and cell2 for...
user3138373
0

votes
0

answer
17

Views

scatter ggplot error - “Aesthetics must be either length 1 or the same as the data (101): colour”

I am trying to create a scatter plot whereby the points are colored by date, with older points being darker than ligher points. In this I use reference and actual data When I run it, however, I get the following error: “Aesthetics must be either length 1 or the same as the data (101): colour” I...
Craig Scoble
1

votes
1

answer
44

Views

ggplot2: can geom_point work in melted dataframes?

I am kind of beginner in ggplot2. I have this dataframe: df
Alex.z
1

votes
1

answer
42

Views

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): title = fields.StringField(label='Title of plot:') yv...
David
1

votes
0

answer
19

Views

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 be able to go through the dataset below in one blus...
maroulator
1

votes
2

answer
37

Views

XY Plotting column data grouped on other column

I have a very large data set with two columns which relate as below. df
Bruce
1

votes
0

answer
82

Views

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?
mobiguneci
1

votes
0

answer
81

Views

How to connect points with smooth line in polar plot?

This is my code: from matplotlib import pyplot as plt dec = pd.read_csv('POLAR.txt', sep=' ', header=None, skiprows=1) ra = [0,30,60,90,120,150,180,210,240,270,300,330] ra = [x/180.0*np.pi for x in ra] ax = plt.subplot(111, projection='polar') plt.polar(ra, dec, 'ok') plt.plot(ra,dec, data=ra ,...
Physabz
1

votes
1

answer
108

Views

How to distinguish points scatter matplotlib on pick

I have two pandas dataframes, data1 and data2 They are shown on the graph. I can click on the point to show the information on this point. But only from one dataset. How to use it for both datasets? Also I need to show information from another array accessing to the data by index. from matplotlib.p...
cuga
1

votes
1

answer
31

Views

Changing the color of points in scatter plot for different dummy values

In my dataset, I have a Price column for house prices and 5 dummy columns for different locations in the city. What I want to do is to show data points on the scatter plot with different colors. For instance, on a scatter plot including all the prices of the houses, I want to have: Red for all pric...
ykesen
1

votes
1

answer
36

Views

D3: Rescaling scatter plot elements with Update, without removing elements

I have some rookie question. I am trying to rescale scatter plot elements (circles along with X axis) based on button click - to create 'zoom in' activity. I am lowering X axis domain for that. It works very well with Xaxis, however its harder with circles. I must remove all of them and draw them...
Darius
1

votes
1

answer
329

Views

pyplot: Plotting scatter plot with multiple Y values and categorical X values

I'm trying to create a simple scatter plot with metrics data I collect from my experiments. Each day, I test multiple experimental samples and the number of samples varies. I'm trying to create a scatter plot with the days as the x values, and all the experimental values collected on that day as the...
JeremyD
1

votes
1

answer
81

Views

update pixi.js scatterplot with new data

I'm trying to create my first animated scatterplot with pixi.js and I don't understand how to update it with new data on click-event (newdata is stored in 'newDaraForUpdate' variable). I'm searching for something like d3 general update pattern that allows to redraw one data to another and remove unn...
1

votes
1

answer
516

Views

AttributeError: 'str' object has no attribute 'view' in Seaborn , Scatterplot

I am getting a bizarre exception in Seaborn. For a reproducible example: toy_data.to_json() '{'X':{'0':0.12765045,'1':0.0244816152,'2':0.1263715245,'3':0.0246376768,'4':0.1108581319,'5':0.1406719382,'6':0.1358105564,'7':0.1245863432,'8':0.1175445352,'9':0.1188479018,'10':0.1113148159,'11':0.11745549...
user8270077
1

votes
2

answer
50

Views

Live scatter plot fetching data from firebase every 2 second

I have a mobile application which does some calculation and throws x,y coordinates and are updated on firebase every 2 seconds. Next i want those coordinates to be plotted on a floor plan live. For that i am using Scatter plot over the floor plan image. But i cannot make it live as soon as the data...
Keyur Kariya
1

votes
1

answer
17

Views

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 first subplot like in the second subplot. The functio...
zorrolo

View additional questions