scatter-plot

structure diagram where each members of group are connected to center and all cluster grand center in r

社会主义新天地 提交于 2019-12-31 09:04:29
问题 I am trying to create a structure diagram from the data like the following: mydf <- data.frame ( group = rep (1:5, each = 20), z = rnorm (20, 10, 1), x = c(rnorm (20, 2, 0.5), rnorm (20, 2, 0.5), rnorm (20, 9, 0.5), rnorm (20, 9, 0.5),rnorm (20, 5, 0.5)), y = c(rnorm (20, 2, 0.5), rnorm (20, 9, 0.5), rnorm (20, 2, 0.5), rnorm (20, 9, 0.5), rnorm (20, 2, 0.5))) means <- aggregate(. ~ group, data = mydf, mean) gmx <-mean (mydf$x) gmy <- mean (mydf$y) library(ggplot2) ggplot(mydf, aes(x, y)) +

Change direction of axis title and label in 3dplots in R?

夙愿已清 提交于 2019-12-31 06:52:09
问题 I have a question that might be easy for a person who is expert in R plot. I need to draw 3D plot in R. My data is as follows: df <- data.frame(a1 = c(489.4, 505.8, 525.8, 550.2, 576.6), a2 = c(197.8, 301, 389.8, 502, 571.2), b1 = c(546.8, 552.6, 558.4, 566.4, 575), b2 = c(287.2, 305.8, 305.2, 334.4, 348.6), c1 = c(599.6, 611.4, 623.6, 658, 657.4), c2 = c(318.8, 423.2, 510.8, 662.4, 656), d1 = c(616, 606.8, 600.2, 595.6, 595), d2 = c(242.4, 292.8, 329.2, 378, 397.2), e1 = c(582.4, 580, 579,

Hide alternate lines in scatter chart coreplot

血红的双手。 提交于 2019-12-31 04:50:25
问题 Can we join alternate coordinates using line in coreplot -> scatter graph in ios ? In above picture suppose I want to join alternate points , what i mean is {0,0} - {1,6} will be joined {1,6} - {2,5} wont be joined {2,5} - {3,6} joined and so on ... Is this possible in coreplot ? Any help would be appreciated ! 来源: https://stackoverflow.com/questions/33259802/hide-alternate-lines-in-scatter-chart-coreplot

Creating a D3.js scatterplot with timeline using 'month-year' date values

旧街凉风 提交于 2019-12-31 02:53:05
问题 I have a dataset that lists dates as follows: var dataset = [ ["1-2006", 20], ["3-2009", 90], ["11-2004", 50], ["5-2012", 33], ["4-2008", 95], ["4-2004", 12], ["7-2000", 44], ["5-2006", 67], ["6-2007", 21], ["3-2001", 88] ]; I am trying to map these dates to a time scale on the x Axis and create a simple scatterplot with D3.js. Is it possible to create a scatterplot using a dataset with date values in the format shown above? I tried to create a min date and max date for the domain of my x

wrong order in (matplotlib.pyplot) scatter plot axis [duplicate]

巧了我就是萌 提交于 2019-12-31 01:00:13
问题 This question already has an answer here : Plot sklearn LinearRegression output with matplotlib (1 answer) Closed 2 years ago . I'm following this linear regression example but my result differs from what should be. The problem is in the plot axis, they are not in order. expected: my result: zoom to see the axis: The Code: import pandas as pd from sklearn import linear_model import matplotlib.pyplot as plt #read data dataframe = pd.read_fwf('brain_body.txt') x_values = dataframe[['Brain']] y

Visualizing large 3D dataset with scatter plot

亡梦爱人 提交于 2019-12-30 10:55:07
问题 I'm running a simulation in MATLAB in which I have a large 3D dataset that changes each time step. I'm trying to visualize the data using a 3D scatter plot with points that take on different locations, sizes, colors, and transparency levels as the simulation proceeds. The size and color information are redundant. Rendering and rotating the figure in MATLAB is slow and choppy. My computer has a 4 GHz i7-4790 CPU and a NVIDIA GeForce GTX 750 Ti graphics card. I am using Matlab R2016a on Windows

How to pick a point in a subplot and highlight it in adjacent subplots in matplotlib(extension to region of points)

坚强是说给别人听的谎言 提交于 2019-12-30 07:31:34
问题 I want to create a scatter plot matrix which will be composed by some subplots. I have extracted from a .txt file my data and created an array of shape (x,y,z,p1,p2,p3). The first three columns of the array represent the x,y,z coordinates from the original image that these data come from and the last three columns(p1, p2, p3) some other parameters. Consequently, in each row of the array the parameters p1, p2, p3 have the same coordinates(x,y,z).In the scatter plot, I want to visualize the p1

Scatterplot with different size, marker, and color from pandas dataframe

自作多情 提交于 2019-12-29 07:42:13
问题 I am trying to do a scatter plot with speed over meters for each point where marker indicate different types, size indicate different weights and color indicate how old a point is over 10 minutes scale. However, I was only able to plot by size so far. Any help is highly appreciated. x = {'speed': [10, 15, 20, 18, 19], 'meters' : [122, 150, 190, 230, 300], 'type': ['phone', 'phone', 'gps', 'gps', 'car'], 'weight': [0.2, 0.3, 0.1, 0.85, 0.0], 'old': [1, 2, 4, 5, 8]} m = pd.DataFrame(x) plt

d3.js scatter plot - zoom/drag boundaries, zoom buttons, reset zoom, calculate median

半世苍凉 提交于 2019-12-29 06:58:07
问题 I've built a d3.js scatter plot with zoom/pan functionality. You can see the full thing here (click 'Open in a new window' to see the whole thing): http://bl.ocks.org/129f64bfa2b0d48d27c9 There are a couple of features that I've been unable to figure out, that I'd love a hand with it if someone can point me in the right direction: I want to apply X/Y zoom/pan boundaries to the area, so that you can't drag it below a certain point (e.g. zero). I've also made a stab at creating Google Maps

How to disable legend in nvd3 or limit it's size

本小妞迷上赌 提交于 2019-12-28 14:22:10
问题 I'm using nvd3 and have a few charts where the legend is much to large. E.g. a scatter/bubble with 15 groups and the group names are long. The legend is so large that it leaves almost no room for the chart itself. Is there a way to remove the legend or toggle the legend or limit the height/width it is taking up? Any example would be great. Also, is there a way to have the bubble show a descriptive string? Right now when you stand on top of a bubble it highlights the x/y coordinates. I also