facets

ElasticSearch - how to exclude filter from aggregations?

隐身守侯 提交于 2019-11-29 19:14:01
问题 I have filtered query with 3 filters: "query": "iphone", color:5, category:10, brand:25 . How can I get amount of products in each brand which have color:5 and category:10 ? In Solr I did it like: fq={!tag=tag_facet_brand}facet_brand:"564"&facet.field={!ex=tag_facet_brand}facet_brand How can I exclude 1 filter from aggregation context? (I can't use global, because I loose query:iphone , I can't use post_filter - because of performance). 回答1: We are just moving from SOLR and we are facing the

Colouring points by factor within the margin of a faceted ggplot2 plot in R

◇◆丶佛笑我妖孽 提交于 2019-11-29 13:58:40
问题 I'd like to create a faceted plot with margins in ggplot2. However, I'd like the margin plot to have colours according to from which facet the particular point has been derived. It's probably best illustrated with an example: library(ggplot2) p <- ggplot(mtcars, aes(mpg, wt)) + geom_point() p + facet_grid(.~gear, margins = TRUE) Within the margin plot labelled as "(all)", I want those dots that have "gear = 3" to be plotted with one colour, those with "gear = 4" with a second colour, and

Project facet Java version 1.7 is not supported

对着背影说爱祢 提交于 2019-11-28 17:07:01
问题 When i update my java I found the issue "Project facet Java version 1.7 is not supported" To resolve this issue follow the steps. Go to Ecllipse , right click on your project folder select the properties now select Project Facets ,here you will see java, click on the version and change the higher version to lower or as per your requirement . 回答1: You need to check what type of JRE is there installed in your IDE, 回答2: I had also encountered the same problem a while ago when upgrading from Java

Characters extracted by istream >> double

放肆的年华 提交于 2019-11-28 00:12:39
Sample code at Coliru : #include <iostream> #include <sstream> #include <string> int main() { double d; std::string s; std::istringstream iss("234cdefipxngh"); iss >> d; iss.clear(); iss >> s; std::cout << d << ", '" << s << "'\n"; } I'm reading off N3337 here (presumably that is the same as C++11). In [istream.formatted.arithmetic] we have (paraphrased): operator>>(double& val); As in the case of the inserters, these extractors depend on the locale’s num_get<> (22.4.2.1) object to perform parsing the input stream data. These extractors behave as formatted input functions (as described in 27.7

Varying axis labels formatter per facet in ggplot/R

点点圈 提交于 2019-11-27 12:06:19
I have a dataframe capturing several measures over time that I would like to visualize a 3x1 facet. However, each measure contains different units/scales that would benefit from custom transformations and labeling schemes. So, my question is: If the units and scales are different across different facets, how can I specify a custom formatter or transformation (i.e., log10) to a particular axis within a facet? For example, let's say I have the data: df = data.frame(dollars=10^rlnorm(50,0,1), counts=rpois(50, 100)) melted.df = melt(df, measure.var=c("dollars", "counts")) How would one go upon

ggplot: Order bars in faceted bar chart per facet

喜欢而已 提交于 2019-11-26 16:43:50
问题 I have a dataframe in R that I want to plot in a faceted ggplot bar chart. I use this code in ggplot: ggplot(data_long, aes(x = partei, y = wert, fill = kat, width=0.75)) + labs(y = "Wähleranteil [ % ]", x = NULL, fill = NULL) + geom_bar(stat = "identity") + facet_wrap(~kat) + coord_flip() + guides(fill=FALSE) + theme_bw() + theme( strip.background = element_blank(), panel.grid.major = element_line(colour = "grey80"), panel.border = element_blank(), axis.ticks = element_line(size = 0), panel