facet

ggplot2: blurry facet labels

旧时模样 提交于 2021-02-19 02:34:13
问题 When I save a ggplot figure -- regardless of whether I use ggsave() or e.g. png() -- the facet labels come out looking blurry. For example, the following code produces a facet label 'F' that looks like the picture below, with coloration on the outer pixels of the text raster. ggplot(data.frame(x=1, y=1, f='F'), aes(x, y)) + facet_grid(. ~ f) ggsave('foo.png') Thanks in advance for any advice! PS -- As per @Brian's request, I'm updating this post to note that I'm using a Windows machine. PPS -

用solr的facet实现聚合标签

混江龙づ霸主 提交于 2021-02-18 04:10:15
Facet,单词意思是侧面,小平面。哈哈,怎么学英文单词了…… 好吧,言归正题,solr的Facet是一个什么东西呢?我个人理解,反映一个搜索词的小平面(或者说某一个分组),起到标签聚合统计的功能。举个列子说,像我们公司的 电商类网站 那样的对搜索结果聚合分类,品牌等属性。如下图 这个是搜索铁观音这个词,统计了 分类和品牌 2个侧面(分组),铁观音在生活分类下有64个,茗茶里面48…… 上面这个说到底,就是某一类型的标签统计,比如xxx年热词等等,只要有记录,也能统计出来,当然,超大数据量提前优化好solr的性能。 介绍了一下facet之后,来说说怎么实现facet。facet的实现其实很简单,主要在搜索参数上带上就OK。 facet=on/true #代表开启facet facet.field=cate #代表要统计的面(分组),比如上面的分类,品牌,可以多次出现 facet.limit =20 #每个分组最多返回条数 facet.mincount = 1 #这个表示分组下某一条目的最小数据量 facet.missing = on/true #统计null的值 facet.method = # 默认为fc, fc表示Field Cache 比如:http://localhost/product/select/?q=铁观音&facet=on&facet.field=category

what's the difference between grouping and facet in lucene 3.5

余生长醉 提交于 2021-02-17 20:05:52
问题 I found in lucene 3.5 contrib folder two plugins: one is grouping, the other is facet. In my option, both of them were used to split my documents into different categories. Why lucene has now two plugins for this? 回答1: They are two different lucene features: Grouping was first released with Lucene 3.2, its related jira issue is LUCENE-1421: it allows to group search results by specified field. For example, if you group by the author field, then all documents with the same value in the author

Best way to format 500+ plots using facet wrap in R? [images & code included]

人盡茶涼 提交于 2021-02-10 17:48:00
问题 I am trying to display sales (y-axis) week over week (x-axis) for 890 vendors. I want to display this data using a facet wrap to quickly see where vendors are having a spike in sales. The plot in my RStudio console looks as such. This Makes sense, as rendering the plot here isnt the best view, however how can I properly format my plots onto a PDF even if it requires multiple pages of PDFs. Code for plot ggplot(Holiday_Spike_Table, aes(x = FSCL_WK, y = SLS))+ geom_col()+ facet_wrap(~MVNDR_NM)

Best way to format 500+ plots using facet wrap in R? [images & code included]

大城市里の小女人 提交于 2021-02-10 17:45:47
问题 I am trying to display sales (y-axis) week over week (x-axis) for 890 vendors. I want to display this data using a facet wrap to quickly see where vendors are having a spike in sales. The plot in my RStudio console looks as such. This Makes sense, as rendering the plot here isnt the best view, however how can I properly format my plots onto a PDF even if it requires multiple pages of PDFs. Code for plot ggplot(Holiday_Spike_Table, aes(x = FSCL_WK, y = SLS))+ geom_col()+ facet_wrap(~MVNDR_NM)

Add text to plot with facetted bar chart

让人想犯罪 __ 提交于 2021-02-10 13:10:25
问题 My question is related to this question. I want "2014" in the 4-year facet. I tried to repeat but my code doesn't give what I want. Annotating text on individual facet in ggplot2 This is my data structure(list(Rot = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c("2-year", "3-year", "4-year"), class = "factor"), Rot.Herb = structure(c(3L, 3L, 4L, 4L, 13L, 13L, 14L, 14L, 5L,

Independent alpha for each plot within facet_grid based on density

本秂侑毒 提交于 2021-02-08 04:36:38
问题 I am constructing a facet_grid using stat_hexbin however I would like the alpha value to be independent for each of the facet plots. I am currently using the following code: ggplot (data, aes (x, y , fill = z)) + stat_binhex(bins=20, aes(alpha = ..count..)) + facet_grid(. ~ z) + guides(alpha = F) + coord_equal() + theme_bw() which produces the following plot: However, the alpha value, which is defined by ..count.. doesn't work when applied outside of the aes within stat_binhex . I would like

Getting rid of facet_grid labels on those gray boxes?

荒凉一梦 提交于 2021-02-06 09:48:29
问题 What I'd like it's to remove those labels on the right side, the ones on gray boxes on the side. I'll give an example: p <- ggplot(mtcars, aes(mpg, wt, col=factor(cyl))) + geom_point() p + facet_grid(cyl ~ .) Thanks in advance! Juan 回答1: The following would do that: p <- ggplot(mtcars, aes(mpg, wt, col=factor(cyl))) + geom_point() p <- p + facet_grid(cyl ~ .) p <- p +theme(strip.text.y = element_blank()) Without rectangles p <- ggplot(mtcars, aes(mpg, wt, col=factor(cyl))) + geom_point() p <-

facets and doing some filtering based on facets

浪尽此生 提交于 2021-01-29 15:50:16
问题 I have a question about facets and doing some filtering based on facets. i know this is a repeated question but i am unable find the answer. i would like to know how can i implement the same functionality in elastic search. lets asume that I have an index about cars and some facets -- eg. model and color. color [ ] red (10) [ ] blue (5) [ ] green (2) model [ ] bmw (4) [ ] vw (5) [ ] ford (8) if I select a model I would like to get only color facets for that model, but I still would like to

Solr: Query Facet and count missing

天涯浪子 提交于 2021-01-29 07:55:45
问题 In my Solr index I have an optional date field. Let's call it Property_3_1044 . I want to find the maximum and the minimum of Property_3_1044 as well as the number of all items without that date . I believe faceting is the best approach. Please correct me if there is a better way! Using Query Facets I can use aggregate functions min and max to obtain minimum and maximum, respectively : http://localhost:8983/solr/Shard/query?q=:&json.facet={Date1:{type:query,facet:{"min":"min(Property_3_1044)"