facet

ggplot2: How to force the number of facets with too few plots?

孤人 提交于 2019-12-01 04:26:27
To plot 9 histograms per ggplot graph I used the following data : id variable value 1 Segment III | RIM BlackBerry Pearl | 5.600000 2 Display size | RIM BlackBerry Pearl | 6.500000 3 Voice/call quality | RIM BlackBerry Pearl | 5.600000 4 Instant messaging availability | RIM BlackBerry Pearl | 7.200000 5 Media quality | RIM BlackBerry Pearl | 6.100000 6 Ease of use for typing | RIM BlackBerry Pearl | 5.700000 7 Speed in accessing email | RIM BlackBerry Pearl | 6.400000 8 Segment II | RIM BlackBerry Pearl | 5.545455 9 Value for money | RIM BlackBerry Pearl | 6.000000 10 Segment III | Palm Treo

facet dynamic fields with apache solr

隐身守侯 提交于 2019-12-01 04:22:46
I have defined dynamic field in ApacheSolr: I use it to store products features like: color_feature, diameter_feature, material_feature and so on. Number of those fields are not constant becouse products are changing. Is it possible to get facet result for all those dynamic fields with the same query or do I need to write always all fields in a query like ... facet.field=color_feature&facet.field=diameter_feature&facet.field=material_feature&facet.field= ... Solr currently does not support wildcards in the facet.field parameter. So *_feature won't work for you. May want to check on this -

Force X axis on both graphs in a facet grid when X values are the same

随声附和 提交于 2019-12-01 03:10:27
I have data with about 30 categories for the X axis in two groups for faceting. I will show this with some random data: dataf <- data.frame(x=c(1:30), A=rnorm(30,20,5), B=rnorm(30,15,0.5)) datam <- melt(dataf, id="x") ggplot(datam, aes(factor(x), value)) + geom_bar(stat="identity") + facet_grid(variable ~ .) This is just lovely, except that it would be easier to quickly read off categories on the top grouping if the x axis was reproduced on that graph too. However ggplot(datam, aes(factor(x), value)) + geom_bar(stat="identity") + facet_grid(variable ~ ., scales="free") makes no difference to

How to apply separate coord_cartesian() to “zoom in” into individual panels of a facet_grid()?

旧城冷巷雨未停 提交于 2019-12-01 00:43:43
问题 Inspired by the Q Finding the elbow/knee in a curve I started to play around with smooth.spline() . In particular, I want to visualize how the parameter df (degree of freedom) influences the approximation and the first and second derivative. Note that this Q is not about approximation but about a specific problem (or edge case) in visualisation with ggplot2 . First attempt: simple facet_grid() library(ggplot2) ggplot(ap, aes(x, y)) + geom_point(data = dp, alpha = 0.2) + geom_line() + facet

GAE getting started in Java, Eclipse Indigo - can't compile as 1.6

﹥>﹥吖頭↗ 提交于 2019-11-30 16:13:06
I feel like I keep going in circles with this one. I followed the Getting Started guide for Google App Engine ( https://developers.google.com/appengine/docs/java/gettingstarted/ ) in Eclipse and everything went relatively well until I uploaded it to the App Engine. I was getting 500 errors so I checked the logs and found this: "guestbook/SignGuestbookServlet : Unsupported major.minor version 51.0]" I then search for this problem (on stackoverflow, of course) and found this solution: Google App Engine and Java Version? So I set the compliance level to 1.6 and then at the bottom of the dialog I

Add hline with population median for each facet

旧城冷巷雨未停 提交于 2019-11-30 08:22:32
问题 I'd like to plot a horizontal facet-wide line with the population median of that facet. I tried the approach without creating a dummy summary table with the following code: require(ggplot2) dt = data.frame(gr = rep(1:2, each = 500), id = rep(1:5, 2, each = 100), y = c(rnorm(500, mean = 0, sd = 1), rnorm(500, mean = 1, sd = 2))) ggplot(dt, aes(x = as.factor(id), y = y)) + geom_boxplot() + facet_wrap(~ gr) + geom_hline(aes(yintercept = median(y), group = gr), colour = 'red') However, the line

What is 'Facet' in JavaEE?

梦想的初衷 提交于 2019-11-30 06:22:00
问题 I wonder not only what is Facet but also what is Facet 'in physical level' (as I understand it's not a separate jar, but what?)? I also wonder how can it affect my application after deploying. I'll explain on real example: I had 2 facets (which were created by IDE): Spring Facet and Web Facet (for jsf). I deployed it to Tomcat and my application worked fine. Then I added (by means of IDE) one more facet - JPA Facet. I redeployed application and.. it still worked fine :) So, I'm just curious

ggplot add ticks to each plot in a facet_wrap

╄→尐↘猪︶ㄣ 提交于 2019-11-30 04:02:13
问题 I'd like to display x-axis ticks on plots in the upper rows in facet_wraps. For example: library(ggplot2) ggplot(diamonds, aes(carat)) + facet_wrap(~ cut, scales = "fixed") + geom_density() generates this plot: I'd like to have ticks as I've drawn in on this plot: Is there a simple way to achieve this result? 回答1: Using scales = "free_x" adds x axes to each plot: ggplot(diamonds, aes(carat)) + geom_density() + facet_wrap(~cut, scales = "free_x") However, as you can see and the syntax suggests

How to let <f:facet> contain multiple components? It shows only the first

≯℡__Kan透↙ 提交于 2019-11-30 03:53:56
I use <f:facet> to create a table header and I want a symbol beside it. However, it doesn't seem to work well. The symbol is not rendered. JSF: <h:column id="subject_column"> <f:facet name="header"> <h:commandLink value="Subject" id="sort_by_subjects" action="#{xxx.sort}"> <f:param id="sortBySubject" name="sortBy" value="SUBJECT"/> </h:commandLink> <span>${isAscending}</span> </f:facet> <h:outputText value="#{email.emailSubject}"/> </h:column> ${isAscending} contains the arrow symbol ↑ and represents the order. I would like to show it beside <h:commandLink> . The <f:facet> can have only one

How to adjust facet size manually

被刻印的时光 ゝ 提交于 2019-11-30 03:35:59
I have a faceted plot with very diverse data. So some facets have only 1 x value, but some others have 13 x values. I know there is the parameter space='free' which adjusts the width of each facet by the data it represents. My question, is there a possibility to adjust this space manually? Since some of my facets are so small, it is no longer possible to read the labels in the facets. I made a little reproducible example to show what I mean. df <- data.frame(labelx=rep(c('my long label','short'), c(2,26)), labely=rep(c('a','b'), each=14), x=c(letters[1:2],letters[1:26]), y=LETTERS[6:7], i