我正在使用faceg_wrap和ggplot创建一个facets图.我的问题是我的方面总是看起来像非常短,非常宽的矩形,但我希望它们是方形的,这样它们更容易理解.理想情况下,我想指定我想要的列数,并让ggplot弄清楚绘图的高度应该是多少,以便所有刻面都是正方形.这可能吗?
作为一个例子,我有这个数据框,称为my_data:
Groups FactorA FactorB FactorC N value sd se ci
1 Control Condition1 Condition1 Condition1 3 92.00000 6.0827625 3.511885 15.110420
2 Control Condition1 Condition1 Condition2 2 69.00000 8.4852814 6.000000 76.237228
3 Control Condition1 Condition2 Condition1 3 72.33333 10.2632029 5.925463 25.495209
4 Control Condition1 Condition2 Condition2 2 97.00000 2.8284271 2.000000 25.412409
5 Control Condition2 Condition1 Condition1 3 85.00000 13.0000000 7.505553 32.293790
6 Control Condition2 Condition1 Condition2 2 78.50000 16.2634560 11.500000 146.121354
7 Control Condition2 Condition2 Condition1 3 95.00000 5.1961524 …Run Code Online (Sandbox Code Playgroud) 我正在为R + ggplot2中的两个数据集生成箱形图,我正在使用构面来打印基于两个因素的图形网格.到目前为止一直很好,重点是两个数据集中的一个是一个因子的一个级别的完全缺失值,因此我得到一个5 x 5的网格和一个5 x 4的网格,但这些网格意味着进行眼睛比较,因此我想显示缺失值的空图.那可能吗?
谢谢,托马索
我在Indigo有一个嵌套的m2Eclipse项目.父项目包含嵌套模块使用的src文件夹(请参阅下面的结构).
从Maven运行配置运行mvn包构建所有模块,因此依赖关系管理似乎正在运行.但是,我没有MAVEN DEPENDENCIES文件夹,我不能在任何源文件上使用Java内容辅助或任何其他Java项目功能.我尝试将项目转换为分面形式并添加java facet,但这也无效.
我经常根据数字变量进行调查,但我希望facet标签比简单数字更具解释性.我通常创建一个新的标签变量,其数字值粘贴到解释性文本.但是,当值在小数点前有多个位置时,第一个数字用于对因子进行排序.有什么建议可以避免吗?
iris[,1:4]<-iris[,1:4]*10
Run Code Online (Sandbox Code Playgroud)
当它在小数点之前没有多于一个值时,这对虹膜可以正常工作.
iris$Petal.Width.label<-paste("Petal.Width=", iris$Petal.Width)
iris$Petal.Width.label<-paste("Petal.Width=", iris$Petal.Width)
qplot(data=iris,
x=Sepal.Length,
y=Sepal.Width,
colour=Species)+facet_wrap(~Petal.Width.label)
Run Code Online (Sandbox Code Playgroud)

我有一个如下查询,
query = {
"query": {"query_string": {"query": "%s" % q}},
"filter":{"ids":{"values":list(ids)}},
"facets": {"destination": {
"terms": {"field": "destination.en"}},
"hotel_class":{
"terms":{"field":"hotel_class"}},
"hotel_type":{
"terms":{"field": "hotel_type"}},
}}
Run Code Online (Sandbox Code Playgroud)
但由于我的ID过滤器,我的方面没有被过滤掉.我得到了所有方面,但我希望它们通过上面的id过滤器进行过滤.你有什么想法 ?
我的问题很简单,但经过多次尝试后我都未能解决.我只想打印一个刻面图(使用ggplot2中的facet_wrap制作)的一些方面,并删除我不感兴趣的那些.
我有与ggplot2的facet_wrap,如下所示:
#anomalies linear trends
an.trends <- ggplot()+
geom_smooth(method="lm", data=tndvilong.anomalies, aes(x=year, y=NDVIan, colour=TenureZone,
group=TenureZone))+
scale_color_manual(values=miscol) +
ggtitle("anomalies' trends")
#anomalies linear trends by VEG
an.trendsVEG <- an.trends + facet_wrap(~VEG,ncol=2)
print(an.trendsVEG)
Run Code Online (Sandbox Code Playgroud)
我按照预期得到了情节(你可以在下面的te链接中看到它):
问题是:我如何只打印出我感兴趣的面孔?我只想打印"CenKal_ShWoodl","HlShl_ShDens","NKal_ShWoodl"和"ThShl_ShDens"
谢谢
我正在玩 mongodb 2.0 的新驱动程序,并寻找添加一些分面搜索(临时移动,在使用弹性搜索之前)。
这是我创建的一些方法来构建聚合。我想它应该工作。
作为参数,我还在方法中传递了一个过滤器定义。但我没有找到如何将我的聚合限制为过滤器。
任何的想法 ???
private void UpdateFacets(SearchResponse response, FilterDefinition<MediaItem> filter, ObjectId dataTableId)
{
response.FacetGroups =new List<SearchFacetGroup>();
SearchFacetGroup group = new SearchFacetGroup()
{
Code = "CAMERAMODEL",
Display = "Camera model",
IsOptional = false
};
using (IDataAccessor da = NodeManager.Instance.GetDataAccessor(dataTableId))
{
var collection = da.GetCollection<MediaItem>();
var list = collection.Aggregate()
.Group(x => ((ImageMetaData) x.MetaData).Exif.CameraModel, g => new { Model = g.Key, Count = g.Count() })
.ToListAsync().Result;
foreach (var l in list)
{
group.Facets.Add(new SearchFacetContainer()
{
Code = l.Model,
Display …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用IBM RAD 7.5.5(基本上是Eclipse +插件)和WebSphere 6.1构建基于JAX-RS的Web服务.
当我创建一个新的Dynamic Web Project时,我得到了"New Dynamic Web Project"对话框.
对于"目标运行时",当我选择"WebSphere 6.1"时,"动态Web模块"是2.4,当我修改配置时,在列表中没有"JAX-RS(REST Web服务)".
但是,对于"目标运行时",当我选择"WebSphere 7.0"时,"动态Web模块"为2.5并修改配置,在列表中选择"JAX-RS(REST Web服务)".
所以我的问题是,为什么在WebSphere 6.1/Dynamic Web Module 2.4的列表中不是"JAX-RS"?它根本不受支持吗?如果有人能解释为什么以及数字"2.4"的含义,我们将不胜感激!
谢谢,罗布
我正在尝试计算多级嵌套文档中的构面.并且在docs或google中找不到任何示例,但发现了这个:
嵌套元素提供将使用的嵌套文档(可以是多级嵌套文档)的路径.(http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets.html#_all_nested_matching_root_documents)
但以下查询不起作用.查询此方面的正确方法是什么?
http://pastie.org/8526599 - 这是我正在尝试使用的映射
http://pastie.org/8526601 - 这里是非工作查询