data-visualization

How to set values in x axis MSChart using C#

时间秒杀一切 提交于 2019-12-17 19:06:50
问题 I have these XY values: Series S1 = new Series() S1.Points.AddXY(9, 25); S1.Points.AddXY(10, 35); S1.Points.AddXY(11, 15); chart1.Series.Add(S1); but I need to show the X values in the graph like this: X="9-10" X="10-11" X="11-12" How can I achieve that? So far this is what I've found: and here is the code: private void Form1_Shown(object sender, EventArgs e) { chart1.ChartAreas[0].AxisX.Minimum = 7; chart1.ChartAreas[0].AxisX.Maximum = 15; Series S1 = new Series(); S1.Points.AddXY(9, 25); S1

How can I plot the relative proportions of two groups using a fill aesthetic in ggplot2?

会有一股神秘感。 提交于 2019-12-17 18:44:30
问题 How can I plot the relative proportions of two groups using a fill aesthetic in ggplot2? I am asking this question here because several other answers on this topic seem incorrect (ex1, ex2, and ex3), but Cross Validated seems to have functionally banned R specific questions (CV meta). ..density.. is conceptually related to, but distinct from proportions (ex4 and ex5). So the correct answer does not seem to involve density. Example: set.seed(1200) test <- data.frame( test1 = factor(sample

What techniques exists in R to visualize a “distance matrix”?

孤人 提交于 2019-12-17 17:21:12
问题 I wish to present a distance matrix in an article I am writing, and I am looking for good visualization for it. So far I came across balloon plots (I used it here, but I don't think it will work in this case), heatmaps (here is a nice example, but they don't allow to present the numbers in the table, correct me if I am wrong. Maybe half the table in colors and half with numbers would be cool) and lastly correlation ellipse plots (here is some code and example - which is cool to use a shape,

Network chord diagram woes in R

喜你入骨 提交于 2019-12-17 10:24:10
问题 I have some data similar to the data.frame d as follows. d <- structure(list(ID = c("KP1009", "GP3040", "KP1757", "GP2243", "KP682", "KP1789", "KP1933", "KP1662", "KP1718", "GP3339", "GP4007", "GP3398", "GP6720", "KP808", "KP1154", "KP748", "GP4263", "GP1132", "GP5881", "GP6291", "KP1004", "KP1998", "GP4123", "GP5930", "KP1070", "KP905", "KP579", "KP1100", "KP587", "GP913", "GP4864", "KP1513", "GP5979", "KP730", "KP1412", "KP615", "KP1315", "KP993", "GP1521", "KP1034", "KP651", "GP2876",

Matplotlib: cancelling the offset of axis introduced in matplotlib 2.0 [duplicate]

匆匆过客 提交于 2019-12-17 09:59:09
问题 This question already has an answer here : How can I change the x axis in matplotlib so there is no white space? (1 answer) Closed 2 years ago . Just noticed this nuance when I editing my works. Previously, the matplotlib would look like this: x=[1,2,3,4,5] y=[4,5,5,2,1] plot(x,y,'-') But after recent upgrade I believe, the there are offset, which would return like this It's a little bit unncessary from what I seen now. I want to know If this offset is a good practice in data visualization?

Constrain aspect ratio in WindowsForms DataVisualization Chart

六眼飞鱼酱① 提交于 2019-12-17 07:54:34
问题 Using the charting control from System.Windows.Forms.DataVisualization.Charting.Chart , I am making a scatter plot. How can I constrain it so that the scale of the X axis is the same as the scale of the Y axis? Simply setting the control itself to be square is insufficient, because it has internal margins for drawing and labeling the axes which are not equal. I could pick a specific size and tweak it to be square, but it needs to be both square and resizable. I've searched high and low in the

How to plot a hybrid boxplot: half boxplot with jitter points on the other half?

时光怂恿深爱的人放手 提交于 2019-12-17 06:45:12
问题 I'm trying to make a similar plot to Fig. 2d-f in an article published on Nature this year. It's basically a half boxplot with points on the other half. Can anyone give me some hints? Thank you very much! These are my data and code which produced full boxes with points inside require(magrittr) require(tidyverse) dat <- structure(list(p1 = c(0.0854261831077604, 0.408418657218253, 0.577793646477315, 0.578028229977424, 0.48933166218204, 0.53117814324334, 0.526653494462464, 0.00687616283435221, 0

Construct a manual legend for a complicated plot

巧了我就是萌 提交于 2019-12-17 00:44:56
问题 This question was migrated from Cross Validated because it can be answered on Stack Overflow. Migrated 6 years ago . I cannot figure out how to manually set up a legend for this plot. All I really want is a simple legend to the right that uses the three colors and has a name next to each. The current code looks like this: a <-c("S1","S2","S3","S4","S5","S6","S7","S8","S9") #names b <-c(0.23,0.26,0.55,0.56,0.36,0.23,0.18,0.06,0.04) #mean t0 c <-c(0.64,0.6,0.81,1.4,0.89,0.55,0.48,0.22,0.09)

Workflow for statistical analysis and report writing

余生长醉 提交于 2019-12-16 22:20:50
问题 Does anyone have any wisdom on workflows for data analysis related to custom report writing? The use-case is basically this: Client commissions a report that uses data analysis, e.g. a population estimate and related maps for a water district. The analyst downloads some data, munges the data and saves the result (e.g. adding a column for population per unit, or subsetting the data based on district boundaries). The analyst analyzes the data created in (2), gets close to her goal, but sees

Imprecision between overlapping maps

蓝咒 提交于 2019-12-14 04:18:34
问题 I created this map ( PLUNKER ). It rapresents Europe by nuts0 (country) and if you right-click on a country, this county is zoomed and its regions (nuts2) are showed. A piece of code: var projectionCurrent = d3.geoMercator() .scale(1) .translate([width / 2, height / 2]); var projectionBase = d3.geoMercator() .scale(1) .translate([width / 2, height / 2]); var path = d3.geoPath().projection(projectionCurrent); var map = d3.select('#container-map'); var mapSvg = map.append('svg') .attr('id',