使用facet时ggplot2控制每行的面板数量?

2024-05-09

Is it possible to control the number of panels per row in a ggplot? I can only get an equal number of panels on each row as in the example plot below. Example plot

例如,我的数据按“标记”自然分为 22 个块,而这些块又按“染料”组织(请参阅下面的示例代码和数据)。在这个例子中,我想将面板排列成 4 行,每行分别有 5、6、6 和 5 个面板(如最后的图片所示,但 22 个块可以同样宽)。

示例代码:

    df$Type <- factor(round(df$Type, 2))
    df$Allele <- factor(df$Allele)
    gp <- ggplot(df, aes_string(x = "Allele", y = "Ratio", colour = "Type")) 
    gp <- gp + geom_point(alpha = 0.8, position = position_jitter(width = 0.1))
    gp <- gp + facet_grid(Dye ~ Marker) + facet_wrap(~Marker, ncol = 5, drop = FALSE, scales = "free_x")
    gp <- gp + guides(fill = guide_legend(reverse = TRUE))
    gp <- gp + labs(title = "Stutter ratios")
    print(gp)

示例数据:

    Marker  Allele  Ratio   Type    Dye
    DYS576  18  0.116157205 -1  B
    DYS389 I    14  0.043252595 -1  B
    DYS448  19  0.018236074 -1  B
    DYS389 II   31  0.102169982 -1  B
    DYS19   14  0.058139535 -1  B
    DYS19   14  0.078224101 -0.2    B
    DYS391  10  0.090035245 -1  G
    DYS481  22  0.013492063 -2  G
    DYS481  22  0.179365079 -1  G
    DYS549  13  0.0625  -1  G
    DYS533  12  0.07564495  -1  G
    DYS437  14  0.04757085  -1  G
    DYS570  17  0.071079867 -1  Y
    DYS570  17  0.007420426 1   Y
    DYS635  21  0.192561983 -1  Y
    DYS390  24  0.073079325 -1  Y
    DYS439  12  0.084817642 -1  Y
    DYS392  13  0.125965997 -1  Y
    DYS393  13  0.009672831 -2  R
    DYS393  13  0.079374111 -1  R
    DYS393  13  0.013371266 1   R
    DYS458  17  0.126099707 -1  R
    DYS385  13  0.059782609 -1  R
    DYS385  16  0.092356688 -1  R
    DYS456  17  0.12    -1  R
    YGATAH4 11  0.07203718  -1  R
    DYS576  18  0.094989562 -1  B
    DYS389 I    14  0.044955045 -1  B
    DYS448  19  0.017171717 -1  B
    DYS389 II   31  0.124137931 -1  B
    DYS391  10  0.052903833 -1  G
    DYS481  22  0.198726115 -1  G
    DYS549  13  0.08853967  -1  G
    DYS533  12  0.106617647 -1  G
    DYS438  9   0.017562533 -1  G
    DYS570  17  0.006710002 -2  Y
    DYS570  17  0.076326274 -1  Y
    DYS570  17  0.007339065 1   Y
    DYS635  21  0.132272501 -1  Y
    DYS390  24  0.078853047 -1  Y
    DYS439  12  0.06980198  -1  Y
    DYS392  13  0.104508197 -1  Y
    DYS393  13  0.083853995 -1  R
    DYS393  13  0.014140085 1   R
    DYS458  17  0.094651285 -1  R
    DYS385  13  0.076977401 -1  R
    DYS385  13  0.076977401 -1  R
    DYS385  16  0.059866962 -1  R
    DYS385  16  0.059866962 -1  R
    DYS456  17  0.151162791 -1  R
    YGATAH4 11  0.09254902  -1  R
    DYS576  18  0.126856684 -1  B
    DYS389 I    14  0.052631579 -1  B
    DYS389 II   31  0.102253033 -1  B
    DYS19   14  0.056882821 -1  B
    DYS19   14  0.080773606 -0.2    B
    DYS391  10  0.053362122 -1  G
    DYS481  22  0.033595801 -2  G
    DYS481  22  0.164829396 -1  G
    DYS549  13  0.123548922 -1  G
    DYS533  12  0.06750174  -1  G
    DYS437  14  0.041118421 -1  G
    DYS570  17  0.097141001 -1  Y
    DYS570  17  0.010071475 1   Y
    DYS635  21  0.070416095 -1  Y
    DYS390  24  0.075715605 -1  Y
    DYS439  12  0.077648766 -1  Y
    DYS392  13  0.116974494 -1  Y
    DYS643  10  0.017945781 -1  Y
    DYS393  13  0.011755878 -2  R
    DYS393  13  0.121810905 -1  R
    DYS393  13  0.017008504 1   R
    DYS458  17  0.097028366 -1  R
    DYS385  13  0.083820663 -1  R
    DYS385  16  0.124661247 -1  R
    DYS456  17  0.11167002  -1  R
    DYS576  18  0.102416918 -1  B
    DYS448  19  0.021699819 -1  B
    DYS19   14  0.064239829 -0.2    B
    DYS391  10  0.054468085 -1  G
    DYS481  22  0.048726467 -2  G
    DYS481  22  0.182724252 -1  G
    DYS549  13  0.091326105 -1  G
    DYS533  12  0.074295474 -1  G
    DYS438  9   0.059535822 -1  G
    DYS437  14  0.044034091 -1  G
    DYS570  17  0.02547279  -2  Y
    DYS570  17  0.129293709 -1  Y
    DYS570  17  0.012350444 1   Y
    DYS635  21  0.09912927  -1  Y
    DYS390  24  0.086936937 -1  Y
    DYS439  12  0.060550459 -1  Y
    DYS392  13  0.149750416 -1  Y
    DYS393  13  0.08388521  -1  R
    DYS393  13  0.016188374 1   R
    DYS458  17  0.009228937 -2  R
    DYS458  17  0.092289372 -1  R
    DYS458  17  0.062816314 1   R
    DYS385  13  0.068504595 -1  R
    DYS385  16  0.077120823 -1  R
    DYS456  17  0.131855309 -1  R
    YGATAH4 11  0.070570571 -1  R
    DYS576  18  0.108604407 -1  B
    DYS389 I    14  0.053097345 -1  B
    DYS389 II   31  0.122986823 -1  B
    DYS19   14  0.044878049 -1  B
    DYS19   14  0.069268293 -0.2    B
    DYS391  10  0.057256368 -1  G
    DYS481  22  0.029480217 -2  G
    DYS481  22  0.171450737 -1  G
    DYS549  13  0.078275862 -1  G
    DYS533  12  0.062146893 -1  G
    DYS437  14  0.037869063 -1  G
    DYS570  17  0.0956807   -1  Y
    DYS570  17  0.021323127 1   Y
    DYS635  21  0.076858108 -1  Y
    DYS390  24  0.099143207 -1  Y
    DYS439  12  0.057610242 -1  Y
    DYS439  12  0.028449502 1   Y
    DYS392  13  0.101621622 -1  Y
    DYS393  13  0.012474012 -2  R
    DYS393  13  0.117463617 -1  R
    DYS393  13  0.01039501  1   R
    DYS458  17  0.081623347 -1  R
    DYS385  13  0.068003487 -1  R
    DYS385  16  0.066376496 -1  R
    DYS456  17  0.149382716 -1  R

Update:终于有时间尝试解决这个问题了。根据 DWin 的回答并在网上找到的一些示例的帮助下,我几乎按照我的意愿创建了一个情节。但是我需要更多帮助才能完全按照我想要的方式得到它:

1)如何使每个图中的面板等宽(或高),并且仍然能够仅在某些图中添加标题和图例。

2)如何将 y 标题和图例在所有绘图中垂直居中。

3)当然,我想在不同面板中对相同类型使用相同的颜色,但我认为使用 ggplot 应该很容易。但这里也欢迎任何建议。

请参阅随附的代码和图像以了解我迄今为止的进展。

# Prepare data.
df$Marker <- factor(df$Marker, levels = c("DYS576", "DYS389 I", "DYS448", "DYS389 II", "DYS19",
                                          "DYS391", "DYS481", "DYS549", "DYS533", "DYS438", "DYS437",
                                          "DYS570", "DYS635", "DYS390", "DYS439", "DYS392",
                                          "DYS643", "DYS393", "DYS458", "DYS385", "DYS456", "YGATAH4" ))
df$Type <- factor(round(df$Type, 2))
df$Dye <- factor(df$Dye, levels = c("B", "G", "Y", "R"))
df$Allele <- factor(df$Allele)

# Get y max to use same scale.
yMax <- max(df$Ratio)

# Get dyes.
dyes <- levels(df$Dye)

# start new page
plot.new() 

# setup layout
gl <- grid.layout(nrow=length(dyes) , ncol=1)
# grid.show.layout(gl) # To inspect layout.

# Init layout
pushViewport(viewport(layout=gl))

# Loop over all dyes.
for(d in seq(along=dyes)){

  # Move to the next viewport
  pushViewport(viewport(layout.pos.col=1, layout.pos.row=d))

  # Create a plot for the current subset.  
  gp <- ggplot(subset(df, Dye==dyes[d]), aes_string(x = "Allele", y = "Ratio")) 
  gp <- gp + geom_point(aes_string(colour = "Type"), alpha = 0.8, position = position_jitter(width = 0.1))
  gp <- gp + facet_grid(Dye ~ Marker, scales="free_x")
  gp <- gp + ylim(0, yMax)

  # If first dye channel.
  if(d == 1){

    # Plot title only.
    gp <- gp + labs(title = "Stutter ratios")
    gp <- gp + theme(axis.title.x=element_blank())
    gp <- gp + theme(axis.title.y=element_blank())

    # Remove legends.
    gp <- gp + theme(legend.position="none")

  } else if(d == length(dyes)){ # If last dye channel.

    # No title but x and y labels.
    # Y label should ideally be centered vertically in final plot.
    gp <- gp + labs(title = element_blank())
    gp <- gp + labs(xlab = "Allele")
    gp <- gp + labs(xlab = "Ratio")

    # Not removing legend works but makes the last plot more compact (horizontally).
    # Can the panel height or width be fixed for all subplots?

    # 'bottom' is nicer (assuming I can't center it vertically in the final plot)
    # but makes the last dye channel very compact (vertically).
    # gp <- gp + theme(legend.position="bottom")

  } else {  # No titles, labels or legends.

    gp <- gp + labs(title = element_blank())
    gp <- gp + theme(axis.title.x = element_blank())
    gp <- gp + theme(axis.title.y = element_blank())
    gp <- gp + theme(legend.position="none")
  }

  # Print the ggplot graphics here
  print(gp, newpage = FALSE)

  # Done with this viewport
  popViewport(1)

}

更新2:新尝试使用 gtable 作为 baptiste 的建议。我现在可以制作出我想要的确切情节。我能想到的唯一外观改进是减少图例占用的水平空间。很高兴对此有任何建议。但我不会花更多的时间去尝试和发现自己,情节对我来说已经足够接近完美了。

新代码和情节如下。代码可能可以清理一下,所以如果您有任何提示,请发表评论。

# Prepare data.
df$Marker <- factor(df$Marker, levels = c("DYS576", "DYS389 I", "DYS448", "DYS389 II", "DYS19",
                                          "DYS391", "DYS481", "DYS549", "DYS533", "DYS438", "DYS437",
                                          "DYS570", "DYS635", "DYS390", "DYS439", "DYS392",
                                          "DYS643", "DYS393", "DYS458", "DYS385", "DYS456", "YGATAH4" ))
df$Type <- factor(round(df$Type, 2))
df$Dye <- factor(df$Dye, levels = c("B", "G", "Y", "R"))
df$Allele <- factor(df$Allele)

# Get y max to use same scale.
yMax <- max(df$Ratio)

# Get dyes.
dyes <- levels(df$Dye)
# Number of dyes.
noDyes <- length(dyes)
# Number of rows in table object.
noRows <- length(dyes) + 2

# Create table object.
g <- gtable(widths=unit(c(1,4,1),c("lines","null","null")),
            heights = unit(c(1,rep(1,noDyes),1), c("line",rep("null",noDyes), "line")))

# Add titles.
g <- gtable_add_grob(g, textGrob("Stutter ratios"), t=1,b=1,l=2,r=2)
g <- gtable_add_grob(g, textGrob("Allele"), t=noRows ,b=noRows ,l=2,r=2)
g <- gtable_add_grob(g, textGrob("Ratio", rot=90), t=1,b=noRows ,l=1,r=1)

# Create a plot for the entire dataset to extract the legend.
gp <- ggplot(df, aes_string(x = "Allele", y = "Ratio")) 
gp <- gp + geom_point(aes_string(colour = "Type"))
# Extract the legend.
guide <- gtable_filter(ggplotGrob(gp), pattern="guide")
# Add the legend to the table object.
g <- gtable_add_grob(g,guide , t=1,b=noRows,l=3,r=3)

# Loop over all dyes.
for(d in seq(along=dyes)){

  # Create a plot for the current subset.
  gp <- ggplot(subset(df, Dye==dyes[d]), aes_string(x = "Allele", y = "Ratio")) 
  gp <- gp + geom_point(aes_string(colour = "Type"), alpha = 0.8, position = position_jitter(width = 0.1))
  gp <- gp + scale_colour_discrete(drop = FALSE)
  gp <- gp + facet_grid(Dye ~ Marker, scales="free_x")
  gp <- gp + ylim(0, yMax)

  # Remove titles, axis labels and legend.
  gp <- gp + labs(title = element_blank())
  gp <- gp + theme(axis.title.x = element_blank())
  gp <- gp + theme(axis.title.y = element_blank())
  gp <- gp + theme(legend.position="none")

  # Add plot panel to table object.  
  g <- gtable_add_grob(g,ggplotGrob(gp), t=(d+1),b=(d+1),l=2,r=2)

}

# Plot.
grid.newpage()
grid.draw(g)

放置 grobs 的一个简单方法是使用 gtable 包,

library(gtable)
gtable_add_grobs <- gtable_add_grob #misleading name

g <- gtable(widths=unit(c(1,4,1),c("lines","null","null")),
            heights = unit(c(1,1,1,1), c("line","null","null", "line")))

lg <- list(textGrob("title"), 
           textGrob("xlab"),
           textGrob("ylab", rot=90),
           rectGrob(),
           rectGrob(),
           rectGrob())

pos <- data.frame(t=c(1, 4, 1, 2, 3, 2),
                  b=c(1, 4, 4, 2, 3, 3),
                  l=c(2, 2, 1, 2, 2, 3),
                  r=c(3, 2, 1, 2, 2, 3))

g <- with(pos, gtable_add_grobs(g, lg, t=t, l=l, b=b, r=r))
grid.newpage()
grid.draw(g)

您可以使用以下命令提取 ggplot 的图例gtable_filter(ggplotGrob(p), pattern="guide").

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用facet时ggplot2控制每行的面板数量? 的相关文章

  • R - 重塑 - 熔化错误

    我正在尝试融化数据框 但出现了这个奇怪的错误 有什么想法吗 str zx7 data frame 519 obs of 5 variables calday new Date format 2011 01 03 2011 01 04 201
  • 如何声明包含 M 个元素的列表对象

    我想声明一个包含 M 3 x 3 矩阵的列表 如果我事先知道数字 M 那么我可以通过以下方式声明这样的列表 elm lt matrix NA 3 3 Say M 7 myList lt list elm elm elm elm elm el
  • 在 R 中提取 data.frames 列表的名称以及 data.frame 中的值

    在下面的代码中 j是 data frames 的命名列表 我想知道是否有办法 a 提取变量的数值 即one short and one long 在 data frames 内并附加它们的相关名称 即 AAA or BBB or CCC 到
  • 在网格中制作一个矩形图例,并标记行和列

    我有一个 ggplot 我将因子映射到填充和 alpha 如下所示 set seed 47 the data lt data frame value rpois 6 lambda 20 cat1 rep c A B each 3 cat2
  • 为什么这个 R ggplot2 代码会显示一个空白的显示设备?

    虽然 SO 通常不用于帮助解决错误 但这个显示了特别简单且特别烦人的行为 如果你是一个ggplot2用户 您可以在 10 秒或更短的时间内重现它 正如这个 GitHub 问题 ggplot gtable 创建空白显示 https githu
  • ggplot:如何限制条形图中的输出,以便仅显示最频繁出现的情况?

    我几个小时以来一直在寻找这个简单的东西 但没有结果 我有一个数据框 其中一列为变量 国家 地区 我想要两件事以下 绘制最常见的国家 地区 最常见的位于顶部 找到部分解决方案EDIT找到完整的解决方案 gt gt 重点问题是根据频率限制条形图
  • R:如何将字符/数字转为1,NA转为0?

    有没有一种简单的方法可以将列的字符 数字变为 1 将 NA 变为 0 这里有一些示例数据 我想将其应用于 3 4 structure list Item Code c 176L 187L 191L 201L 217L 220L Item x
  • 扩展数据框以使其具有与原始行中两列的范围一样多的行[重复]

    这个问题在这里已经有答案了 我有一个数据框如下 structure list symbol c u n v i a start c 9L 6L 10L 8L 7L end c 14L 15L 12L 13L 11L Names c symb
  • 如何动态地将 sliderInput 添加到闪亮的应用程序中?

    使用闪亮 我上传一个 csv 文件 并根据列名称 我需要向 ui 添加滑块 sidebarPanel fileInput file1 Upload CSV File to Create a Model accept c text csv t
  • R 中 SVG 图形的最佳设备? [关闭]

    Closed 这个问题不符合堆栈溢出指南 help closed questions 目前不接受答案 我想从 R 导出 SVG 图形 似乎有两种选择 RSvgDevice 和 Cairo 有人可以对这些包发表评论吗 是默认的还是明显比另一个
  • 如何将旋转的 NetCDF 转换回正常的纬度/经度网格?

    我有一个带有旋转坐标的 NetCDF 文件 我需要将其转换为正常的纬度 经度坐标 经度为 180到180 纬度为 90到90 library ncdf4 nc open dat nf 对于尺寸 它显示 1 5 variables exclu
  • ggplot 中的 ggsave() for python 不保存

    我已将 ggplot 导入到 python 中 并运行以下脚本 希望 ggsave 实际上将我的绘图保存在某处 但它似乎实际上并未将任何内容写入 png 文件以供以后使用 当我在解释器中将其作为 p 返回时 该图就会返回 但我必须手动保存它
  • StatET调试工具

    我想我只是很密集 但我似乎无法弄清楚如何在 Eclipse 中的 R 中使用调试工具 StatET 插件 有人有关于这个主题的任何提示或教程吗 StatET 2 00 现在对高级 可视化调试提供实验性支持 需要 Eclipse 3 6 或
  • 在闪亮的数据表中为每个单元格显示工具提示或弹出窗口?

    有没有什么方法可以为 r闪亮数据表中的每个单元格获取工具提示 有很多方法可以获取悬停行或列 但我找不到一种方法来获取行和列索引并为每个单元格显示不同的悬停工具提示 任何人都可以修改以下代码吗 library shiny library DT
  • 使用“assign()”为列表项分配值

    首先了解一些背景 我写了一个中缀函数 本质上取代了这个习惯用法 x length x 1 lt y 或者简单地说x lt append x y 对于向量 这里是 lt function x y xcall lt substitute x x
  • 使用data.table进行聚合

    经过 SO 用户的多次建议后 我终于尝试将我的代码转换为使用data table library data table DT lt data table plate paste0 plate rep 1 2 each 5 id rep c
  • 将 Excel 文件读入 R 并锁定单元格

    我有一个 Excel 电子表格要读入 R 它受密码保护并锁定了单元格 我可以使用 excel link 导入受密码保护的文件 但我不知道如何解锁 取消保护单元格 excel link 给了我这个错误 gt
  • 如何在R中分离两个图?

    每当我运行这段代码时 第一个图就会简单地覆盖前一个图 R中有没有办法分开得到两个图 plot pc title main abc xlab xx ylab yy plot pcs title main sdf xlab sdf ylab x
  • 如何使用plotmath更新ggplot图例标签

    我正在尝试更新ggplot要使用的图例标签plotmath但是 当我这样做时 它将之前组合的图例分成两部分 通过一个例子可能更容易理解 test data and the default plot gives the correct col
  • 斯皮尔曼相关性和联系

    我正在一小组配对排名上计算斯皮尔曼的 rho 斯皮尔曼因处理领带不当而闻名 例如 取2组8个排名 即使两组中有6个是平局 相关性仍然很高 gt cor test c 1 2 3 4 5 6 7 8 c 0 0 0 0 0 0 7 8 met

随机推荐

  • Excel 2013 COM API 在服务帐户下挂起 ExportAsFixedFormat

    我有一个 NET Windows 服务 它调用 Excel 2013 COM API 以在 PDF 上导出 Excel 文档 我已尝试使用在两个不同域帐户下运行的 Windows 服务来执行此代码 这两个帐户都是运行代码的计算机上的本地管理
  • Matplotlib:imshow 中 set_data 对绘图没有影响

    我有一个奇怪的错误 没有你的帮助我无法修复 当我设置图像后imshow在 matplotlib 中 即使我用方法更改它 它也始终保持不变set data 看看这个例子 import numpy as np from matplotlib i
  • GUI设计技术增强用户体验[关闭]

    就目前情况而言 这个问题不太适合我们的问答形式 我们希望答案得到事实 参考资料或专业知识的支持 但这个问题可能会引发辩论 争论 民意调查或扩展讨论 如果您觉得这个问题可以改进并可能重新开放 访问帮助中心 help reopen questi
  • 将文本置于圆形按钮上居中

    我想创建一个按钮圆形链接 其中包含文本 但我在将文本置于圆形按钮内居中时遇到问题 行高太大 对这个问题有什么建议吗 这是代码 https jsfiddle net hma443rL https jsfiddle net hma443rL b
  • 如何在 PowerShell 中使用参数执行外部程序?

    我读过这个答案堆栈溢出 https stackoverflow com questions 1673967 how to run exe in powershell with parameters with spaces and quote
  • 更改svg中半圆的背景颜色

    我想在此 svg 代码上创建上弦月和第三弦月
  • Azure 工作簿中的可选下拉参数

    我想在 Azure 工作簿中创建可选下拉参数 创建下拉参数有了本指南 https 20https learn microsoft com en us azure azure monitor visualize workbooks dropd
  • 提交 ID 从哪里来?

    我只是对此很好奇 提交 ID 不能是随机的 因为它们需要是唯一的 不过 它们似乎是随机的 这让我想知道 为什么它们不只是连续的数字 我的意思是 它们只需要在存储库中是唯一的 对吧 或者我在这里错了 Thanks Git 提交 ID 是 SH
  • 我在哪里可以学习如何使 C++ 程序与操作系统 (Linux) 交互

    我是一个 C 初学者 我想创建与操作系统交互的小程序 使用 Kubuntu Linux 到目前为止 我还没有找到任何教程或手册来让 C 与操作系统交互 在 PHP 中 我可以使用命令 exec 或反引号运算符来启动通常在控制台中执行的命令
  • xml2 包 (R) 中的 xml_find_all 函数未找到相关节点

    我使用 R 中的 xml2 包来访问 xml 数据 发现它在不同的 xml documents 上表现不同 在这个宠物的例子中 library xml2 doc lt read xml
  • 访问函数中的环境

    In main我可以读取我的配置文件 并将其提供为runReader somefunc myEnv正好 但somefunc不需要访问myEnv读者提供 链中的下一对也没有提供 需要 myEnv 中某些内容的函数是一个微小的叶函数 如何在不将
  • 使用 gbuffer 在 R 中缓冲(地理)空间点

    我正在尝试缓冲数据集中半径为 100 公里的点 我正在使用该功能gBuffer从包装中rgeos 这是我到目前为止所拥有的 head sampledf postalcode lat lon city province 1 A0A0A0 47
  • iOS 中的 NSCachesDirectory 和 NSDownloadsDirectory 有什么区别?

    我想将下载的杂志保存到我的 iOS 应用程序中的一个目录中 它似乎NSCachesDirectory and NSDownloadsDirectory是合适的 我不知道它们之间有什么区别 以及哪一种适合下载杂志 任何建议表示赞赏 内存不足时
  • Facebook Messenger 平台 - 检测用户输入

    在开发机器人时 通常的做法是向用户显示打字指示器 而机器人在后台工作 但是是否可以检测相反的情况 用户是否正在打字或空闲 我在文档或谷歌中找不到任何信息 有人知道如何实现这一目标吗 目前还无法做到这一点 您只能向用户显示您正在输入 typi
  • DateTime2 之后的数字是用于纳秒目的吗?

    我已经阅读了该文档 但我不完全理解 默认精度是datetime2 7 7代表纳秒的精度 不 该数字表示秒的小数点后保留的位数 3 表示毫秒 6 微秒 7 相当于 100 纳秒的精度
  • 使用 AWS SSO 时 AWS Java SDK 未找到配置文件

    当我使用 AWS SSO 登录时 我无法访问 aws 我使用以下方式从计算机登录 aws sso login profile staging 配置文件的配置如下 profile staging sso start url https som
  • 使用 ssh 身份验证的 IntelliJ 设置存储库

    我正在尝试使用设置存储库Intellij 2017 1 中的功能 但我想使用 ssh url 作为存储库而不是 https 我不喜欢处理那些在第一次创建后无法复制的个人访问令牌 所以我尝试使用 ssh 但当我单击 覆盖本地 时 出现以下错误
  • 使用 StretchDIBits 使用 Delphi 6 处理条形码图像 - 输出中缺少条形线

    我的应用程序是在 Delphi 6 中开发的 由于后台处理和大量数据 它消耗大约 60MB 120MB 物理内存 这是一个资源密集型应用程序 该应用程序的功能之一是在进行某些处理后创建条形码图像 如果用户继续生成条形码 那么至少十分之一的条
  • 如何处理重叠的因子水平? (例如,生成表格和图表时)

    我面临一个数据集的问题重叠因素水平 我想按因素级别生成时间线 条形图和统计数据 但是 我希望因子水平是模棱两可的 这意味着属于多个级别的观察结果应该在图中出现多次 这是我的数据结构的示例 head lt c ID YEAR BRAZIL G
  • 使用facet时ggplot2控制每行的面板数量?

    Is it possible to control the number of panels per row in a ggplot I can only get an equal number of panels on each row