visualization

how to make single stacked bar chart in ggplot2

落花浮王杯 提交于 2019-12-18 04:13:00
问题 Ancestry <- data.frame(Race = c("European", "African American", "Asian", "Hispanic", "Other"), Proportion = c(40, 30, 10, 15, 5)) Ancestry %>% ggplot(aes(y = Proportion, fill = Race)) + geom_bar(stat="identity", colour="white") Running the above code gives me the following error: Warning in min(x, na.rm = na.rm) : no non-missing arguments to min; returning Inf Warning in max(x, na.rm = na.rm) : no non-missing arguments to max; returning -Inf Warning in min(diff(sort(x))) : no non-missing

Transparency and Alpha levels for ggplot2 stat_density2d with maps and layers in R

安稳与你 提交于 2019-12-18 04:12:42
问题 Can anyone offer suggestions as to the best way to deal with transparency and alpha levels with many layers (with reference to ggplot2 )? In the sample code below, it becomes very difficult to see individual state borderlines (e.g. South Carolina, North Carolina, Virginia) -- I have tried setting alpha=0.00001 but this appears to make things worse... library(ggplot2) all_states = map_data("state") set.seed(103) df = data.frame(long=sample(-90:-70,100,T), lat=sample(30:45,100,T)) p = ggplot()

Application to generate Java class hierarchy diagram [closed]

泄露秘密 提交于 2019-12-18 01:06:32
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Looking for a tool that: Produces a visually pleasing (not garish), orthogonally structured graph hierarchy Outputs high-quality PNG images (300dpi+) Visually differentiates classes, abstract classes, interfaces, and enumerated types (preferably by colour) Interactive user interface Allows pruning of packages

Application to generate Java class hierarchy diagram [closed]

强颜欢笑 提交于 2019-12-18 01:05:18
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Looking for a tool that: Produces a visually pleasing (not garish), orthogonally structured graph hierarchy Outputs high-quality PNG images (300dpi+) Visually differentiates classes, abstract classes, interfaces, and enumerated types (preferably by colour) Interactive user interface Allows pruning of packages

Texture in barplot for 7 bars in R?

你说的曾经没有我的故事 提交于 2019-12-17 22:35:44
问题 I have 7 different categories per each value in X. I am using barplot to plot these categories. Such graph looks fine in colors printer, but what if I want it to be fine in black & white. You can check the graph below. I want to have different colors texture, so the graph looks good in color and black & white printer. I used densities = c(10,30,40,50,100,60,80) for density parameter in barplot function. Are there any other ways to do different texture in barplot? Note: I tried the angle value

How to filter FFT data (for audio visualisation)?

半城伤御伤魂 提交于 2019-12-17 21:52:58
问题 I was looking at this Web Audio API demo, part of this nice book If you look at the demo, the fft peaks fall smoothly. I'm trying to do same with Processing in Java mode using the minim library. I've looked at how this is done with the web audio api in the doFFTAnalysis() method and tried to replicate this with minim. I also tried to port how abs() works with the complex type: / 26.2.7/3 abs(__z): Returns the magnitude of __z. 00565 template<typename _Tp> 00566 inline _Tp 00567 __complex_abs

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

Draw a chronological timeline with ggplot2

你。 提交于 2019-12-17 17:38:34
问题 I have data like data = as.data.frame( rbind( c("1492", "Columbus sailed the ocean blue"), c("1976", "Americans listened to Styx"), c("2008", "financial meltdown. great.") )) and I want to build a plot in ggplot2 that will display an arrow for time aes(x=$V1) and text for aes(label=$V2) . It sounded pretty simple until I tried to draw it. update: I didn't write it but you need to do as.Date("1492", format="%Y") to reproduce correctly. NB: Solutions given below only deal with events that occur

HTML5 Audio Visualizer? [closed]

╄→尐↘猪︶ㄣ 提交于 2019-12-17 17:30:20
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Is there such a player? I'm looking into making one purely out of JavaScript. Something like http://www.nihilogic.dk/labs/pocket_full_of_html5/ but randomly all mashed together? What are your thoughts? 回答1: 2 years later and a solution is found :) https://github.com/jsantell/dancer.js I also stumbled upon a

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,