data-visualization

Two LineSeries with the same Y Axis in WPF Toolkit charts

你。 提交于 2019-12-10 22:26:17
问题 I want to do the following with the WPF toolkit charts: I have two line series that should use the same y axis (i.e I want them both to be on the same scale). I could give each of them the same axis definition so they would overlap (and then have one of them with collapsed visibility), but that is not my best choice. This is the solution I'm talking about: <charts:LineSeries Name="ExternalMeasureSeries" IndependentValueBinding="{Binding Time}" DependentValueBinding="{Binding ExternalMeasure}"

How to cut y axis to make the chart look better?

拈花ヽ惹草 提交于 2019-12-10 22:15:41
问题 What I'm trying to do is create a bar chart using D3.js (v4) that will show 2 or 3 bars that have a big difference in values. Like shown on the picture below yellow bar has a value 1596.6, whereas the green bar has only 177.2. So in order to show the charts in elegant way it was decided to cut the y axis at a certain value which would be close to green bar's value and continue closer to yellow bar's value. On the picture the y axis is cut after 500 and continues after 1500. How one would do

How to organize error bars to relevant bars in a stacked bar plot in ggplot?

北战南征 提交于 2019-12-10 22:14:28
问题 I stacked the bar plots from three different treatment together for comparison. However, I am having trouble putting the error bars in the right position. I am not sure if my codes are correct since I have a feeling that this should be an easy fix. Any help would be appreciated. dff <- structure(list(month = structure(c(1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 4L, 4L, 4L), .Label = c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"), class = c("ordered", "factor")

add space/gap in a line in D3

天涯浪子 提交于 2019-12-10 19:56:54
问题 I have a multiline chart similar to this, where each line represent a particular year and the x-axis represents days (e.g. Jan 1, Jan 2, ... Dec 31) in that particular year. some lines are for leap years and some are for non-leap years. For a non-leap year line, I want the date Feb 29 to not display anything, i.e. a gap or a blank space in the line. Right now, my data set has null in the Feb 29 object. So D3 considers that point as 0 and stretches it all the way to bottom(x-axis). Is there

Shade background of ggplot according to month

南楼画角 提交于 2019-12-10 18:58:41
问题 This code: df <- data.frame(day <- 0:365, value = 1) library(ggplot2) ggplot(df, aes(day, value)) + geom_blank() + scale_x_continuous(breaks = seq(0, 365, 10)) + theme_bw() Produces this plot: Using R code, I want to shade the background of the plot according to which day falls in which month. I want the plot to look like below (the plot background is Photoshopped). I would be particularly interested in a solution that uses lubridate . 回答1: Here's part of the solution using geom_raster .

Plotting tetrahedron with data points in R

最后都变了- 提交于 2019-12-10 18:55:52
问题 I'm in a little bit of pain at the moment. I'm looking for a way to plot compositional data.(https://en.wikipedia.org/wiki/Compositional_data). I have four categories so data must be representable in a 3d simplex ( since one category is always 1 minus the sum of others). So I have to plot a tetrahedron (edges will be my four categories) that contains my data points. I've found this github https://gist.github.com/rmaia/5439815 but the use of pavo package(tcs, vismodel...) is pretty obscure to

NaN x and y values in Pack Layout nodes using d3.js

回眸只為那壹抹淺笑 提交于 2019-12-10 18:29:35
问题 I'm trying to make a circle packing chart using d3.js. The problem is that nodes have NaN values in the x and y properties, so all the circles have transform=" translate(NaN,NaN) " Json Data: var data = { "name": "flare", "children": [ { "name": "analytics", "children": [ { "name": "cluster", "children": [ {"name": "AgglomerativeCluster", "size": 3938}, {"name": "CommunityStructure", "size": 3812}, ] }, { "name": "graph", "children": [ {"name": "BetweennessCentrality", "size": 3534} ] }] }] }

D3.js using ordinal scale over linear scale

女生的网名这么多〃 提交于 2019-12-10 16:40:06
问题 Why is it better to use this instead of a linear scale for making an ordered bar chat? The argument that I've heard is that this can keep the data sets in order, but can't this also be done if one sets the index number of the individual data as the x-coordinate? dataset = [ 5, 10, 13, 19, 21, 25, 22, 18, 15, 13]; var xScale = d3.scale.ordinal() .domain(d3.range(dataset.length)) 回答1: The reason you should use an ordinal scale instead of a linear scale is simple, although a lot of people get

How can I more quickly render my array?

我们两清 提交于 2019-12-10 15:55:07
问题 I have been working on a nonogram solver in Java, and all of my algorithm works fine, but I have been struggling with the visualization a little bit. During the execution of the algorithm, I have access to two "solution-arrays". One is of type int[][] , and contains values -1 for "certainly white", 0 for "uncertain" and 1 for "certainly black". Another array is of type float[][] which contains values between 0 and 1 , here 0 is for certainly white, 1 is for certainly black and a value of .2

Adding a traditional legend to dumbbell plot in `ggalt::geom_dumbbell` in `R`

落花浮王杯 提交于 2019-12-10 15:19:34
问题 How to add a traditional legend to dumbbell plot created using ggalt::geom_dumbbell in R ? This question has an answer with an in-chart legend. How to map the aesthetics to get a separate legend for the points on the side/bottom ? library(ggalt) df <- data.frame(trt=LETTERS[1:5], l=c(20, 40, 10, 30, 50), r=c(70, 50, 30, 60, 80)) ggplot(df, aes(y=trt, x=l, xend=r)) + geom_dumbbell(size=3, color="#e3e2e1", colour_x = "red", colour_xend = "blue", dot_guide=TRUE, dot_guide_size=0.25) + theme_bw()