data-visualization

MSChart: How to group RangeBar data with text labels instead of indexes?

这一生的挚爱 提交于 2019-12-04 04:33:54
问题 I'm looking to plot data on a RangeBar chart area (System.Windows.Forms.DataVisualization.Charting) and I'm having issues grouping the data when I have text values for the labels on the vertical axis. Here's the pertinent code: var connectedTimeRangeSeries = theChart.Series.Add("ConnectedTimeRangeSeries"); var connectedTimeRangesChartArea = theChart.ChartAreas["PerItemConnectedChartArea"]; connectedTimeRangeSeries.ChartArea = connectedTimeRangesChartArea.Name; connectedTimeRangeSeries

Arranging circles in data visualisation

限于喜欢 提交于 2019-12-04 02:01:48
问题 For my data visualisation I need to arrange various sized circles into a compact area - rectangle or circle. (See this and this example.) In theory it is a two-dimensional-irregular-cutting-stock-problem but I would like to avoid going that way. You can find similar visualisations all over the web and I doubt they use any rigorous math. All I need is the circles to appear to be arranged in some orderly fashion (with approximately same distance between them). There must be an easier way than

Is there any way to manipulate the titles of a ctree plot?

拜拜、爱过 提交于 2019-12-04 01:59:50
问题 This question was migrated from Cross Validated because it can be answered on Stack Overflow. Migrated 5 years ago . Is there any way to change the title sizes of a ctree plot? Use the following variables to quickly set up a ctree plot a<-c(41, 45, 50, 50, 38, 42, 50, 43, 37, 22, 42, 48, 47, 48, 50, 47, 41, 50, 45, 45, 39, 45, 46, 48, 50, 47, 50, 21, 48, 50, 48, 48, 48, 46, 36, 38, 50, 39, 44, 44, 50, 49, 40, 48, 48, 45, 39, 40, 44, 39, 40, 44, 42, 39, 49, 50, 50, 48, 48, 47, 48, 47, 44, 41,

using Matplotlib how to highlight one point in the final plot

白昼怎懂夜的黑 提交于 2019-12-04 01:13:17
Suppose, I have x = [1,2,3,4,5,6] and the corresponding y = [3,4,5,6,7,8] . I want the first pair (1,3) to be in a different color or shape. How can this be done using python? One of the simplest possible answers. import matplotlib.pyplot as plt x = [1,2,3,4,5,6] y = [3,4,5,6,7,8] plt.plot(x[1:], y[1:], 'ro') plt.plot(x[0], y[0], 'g*') plt.show() 来源: https://stackoverflow.com/questions/41489543/using-matplotlib-how-to-highlight-one-point-in-the-final-plot

using multiple size scales in a ggplot

試著忘記壹切 提交于 2019-12-04 01:06:04
问题 I'm trying to construct a plot which shows transitions from one class to another. I want to have circles representing each class sized according to a class attribute, and arrows from one class to another, sized according to the number of transitions from one class to another. As an example: library(ggplot2) points <- data.frame( x=runif(10), y=runif(10),class=1:10, size=runif(10,min=1000,max=100000) ) trans <- data.frame( from=rep(1:10,times=10), to=rep(1:10,each=10), amount=runif(100)^3 )

How to Bound the Outer Area of Voronoi Polygons and Intersect with Map Data

你离开我真会死。 提交于 2019-12-03 23:47:30
Background I'm trying to visualize the results of a kmeans clustering procedure on the following data using voronoi polygons on a US map. Here is the code I've been running so far: input <- read.csv("LatLong.csv", header = T, sep = ",") # K Means Clustering set.seed(123) km <- kmeans(input, 17) cent <- data.frame(km$centers) # Visualization states <- map_data("state") StateMap <- ggplot() + geom_polygon(data = states, aes(x = long, y = lat, group = group), col = "white") # Voronoi V <- deldir(cent$long, cent$lat) ll <-apply(V$dirsgs, 1, FUN = function(x){ readWKT(sprintf("LINESTRING(%s %s, %s

plotting 3d scatter in matplotlib

浪子不回头ぞ 提交于 2019-12-03 17:22:52
问题 I have a collection of Nx3 matrices in scipy/numpy and I'd like to make a 3 dimensional scatter of it, where the X and Y axes are determined by the values of first and second columns of the matrix, the height of each bar is the third column in the matrix, and the number of bars is determined by N. Each matrix represents a different data group and I want each to be plotted with a different color, and then set a legend for the entire figure. I have the following code: fig = pylab.figure() s =

Visualize in R flow from one set of objects to another

白昼怎懂夜的黑 提交于 2019-12-03 17:14:27
I am interested in how grants are reviewed at the NIH. The way the grant review process works is that Congress allocates funding to various institutes (e.g., the National Cancer Institute, or NCI), and individual grants are submitted to these institutes. These institutes are organized around various funding priorities (e.g., cancer, infectious diseases, etc). However, when grants are reviewed, they are typically (but not always) sent to individual study sections, which are organized more around scientific disciplines. Thus, the "Tumor Progression" study section can find itself reviewing grants

How can I render 3D histograms in python?

…衆ロ難τιáo~ 提交于 2019-12-03 17:02:19
问题 I want to make plots like these from Hacker's Delight: What ways are there to accomplish this in Python? A solution that makes it easy to interactively adjust the graph (changing the slice of X/Y currently being observed) would be ideal. Neither matplotlib nor the mplot3d module have this functionality AFAICT. I found mayavi2 but it's extremely clunky (I can't even find the option for adjusting the sizes) and only seems to work correctly when run from ipython. Alternatively gnuplot could work

Bar charts connected by lines / How to connect two graphs arranged with grid.arrange in R / ggplot2

我是研究僧i 提交于 2019-12-03 16:51:07
At Facebook research, I found these beautiful bar charts which are connected by lines to indicate rank changes: https://research.fb.com/do-jobs-run-in-families/ I would like to create them using ggplot2. The bar-chart-part was easy: library(ggplot2) library(ggpubr) state1 <- data.frame(state=c(rep("ALABAMA",3), rep("CALIFORNIA",3)), value=c(61,94,27,10,30,77), type=rep(c("state","local","fed"),2), cumSum=c(rep(182,3), rep(117,3))) state2 <- data.frame(state=c(rep("ALABAMA",3), rep("CALIFORNIA",3)), value=c(10,30,7,61,94,27), type=rep(c("state","local","fed"),2), cumSum=c(rep(117,3), rep(182,3)