- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想缩小绘图区域,以便为 ggrepel
留出更多空间当前被切断的标签。我似乎无法再通过 nudge_x()
抵消标签了,而且我不想缩小文本大小。
我试图找到一种压缩图表的方法,以便所有组都靠近中心,在 x 轴的两端为标签留出更多空间。
具体来说,我试图将这个数字编织成一个人像 PDF。我试过控制 fig.width
在块选项中,但这只会使整个图表变小。
我想最大化纵向页面上的宽度,但相对于标签区域缩小绘图区域。
---
title : "The title"
shorttitle : "Title"
author:
- name : "Me"
affiliation : "1"
corresponding : yes # Define only one corresponding author
address : "Address"
email : "email"
affiliation:
- id : "1"
institution : "Company"
authornote: |
Note here
abstract: |
Abstract here.
floatsintext : yes
figurelist : no
tablelist : no
footnotelist : no
linenumbers : no
mask : no
draft : no
note : "\\clearpage"
documentclass : "apa6"
classoption : "man,noextraspace"
header-includes:
- \usepackage{pdfpages}
- \usepackage{setspace}
- \AtBeginEnvironment{tabular}{\singlespacing}
- \makeatletter\let\expandableinput\@@input\makeatother
- \interfootnotelinepenalty=10000
- \usepackage{float} #use the 'float' package
- \floatplacement{figure}{H} #make every figure with caption = h
- \raggedbottom
output : papaja::apa6_pdf
---
```{r test, fig.cap="Caption.", fig.height=8, include=TRUE, echo=FALSE}
library("papaja")
library(tidyverse)
library(ggrepel)
ageGenderF <- structure(list(genAge = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 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, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L), .Label = c("Women, 15-19",
"Women, 20-24", "Women, 25-35", "Women, 36+"), class = "factor"),
word_ = c("this is label 2", "this is label 3", "this is label 4",
"this is label 1", "this is label 7", "this is label 5",
"this is label 8", "this is label 10", "this is label 11",
"this is label 20", "this is label 12", "this is label 6",
"this is label 17", "this is label 9", "this is label 15",
"this is label 21", "this is label 31", "this is label 25",
"this is label 26", "this is label 19", "this is label 24",
"this is label 28", "this is label 29", "this is label 30",
"this is label 14", "this is label 22", "this is label 18",
"this is label 54", "this is label 32", "this is label 44",
"this is label 52", "this is label 34", "this is label 59",
"this is label 48", "this is label 23", "this is label 47",
"this is label 38", "this is label 35", "this is label 61",
"this is label 56", "this is label 39", "this is label 72",
"this is label 42", "this is label 16", "this is label 66",
"this is label 37", "this is label 51", "this is label 27",
"this is label 40", "this is label 73", "this is label 60",
"this is label 113", "this is label 50", "this is label 45",
"this is label 81", "this is label 84", "this is label 53",
"this is label 49", "this is label 67", "this is label 68",
"this is label 46", "this is label 65", "this is label 41",
"this is label 57", "this is label 1", "this is label 2",
"this is label 3", "this is label 4", "this is label 5",
"this is label 6", "this is label 7", "this is label 8",
"this is label 9", "this is label 10", "this is label 11",
"this is label 12", "this is label 13", "this is label 14",
"this is label 15", "this is label 16", "this is label 17",
"this is label 18", "this is label 19", "this is label 20",
"this is label 21", "this is label 22", "this is label 23",
"this is label 24", "this is label 25", "this is label 26",
"this is label 27", "this is label 28", "this is label 29",
"this is label 30", "this is label 31", "this is label 32",
"this is label 33", "this is label 34", "this is label 35",
"this is label 36", "this is label 37", "this is label 38",
"this is label 39", "this is label 40", "this is label 41",
"this is label 42", "this is label 43", "this is label 44",
"this is label 45", "this is label 46", "this is label 47",
"this is label 48", "this is label 49", "this is label 50",
"this is label 51", "this is label 52", "this is label 53",
"this is label 54", "this is label 55", "this is label 56",
"this is label 57", "this is label 58", "this is label 59",
"this is label 60", "this is label 61", "this is label 62",
"this is label 63", "this is label 64", "this is label 1",
"this is label 2", "this is label 3", "this is label 6",
"this is label 4", "this is label 5", "this is label 12",
"this is label 7", "this is label 8", "this is label 9",
"this is label 10", "this is label 14", "this is label 11",
"this is label 18", "this is label 29", "this is label 45",
"this is label 27", "this is label 15", "this is label 26",
"this is label 71", "this is label 37", "this is label 13",
"this is label 25", "this is label 23", "this is label 22",
"this is label 41", "this is label 42", "this is label 55",
"this is label 52", "this is label 36", "this is label 34",
"this is label 17", "this is label 63", "this is label 24",
"this is label 19", "this is label 28", "this is label 38",
"this is label 32", "this is label 21", "this is label 30",
"this is label 35", "this is label 16", "this is label 64",
"this is label 20", "this is label 31", "this is label 53",
"this is label 77", "this is label 39", "this is label 70",
"this is label 57", "this is label 48", "this is label 43",
"this is label 132", "this is label 51", "this is label 66",
"this is label 58", "this is label 85", "this is label 120",
"this is label 65", "this is label 40", "this is label 121",
"this is label 78", "this is label 59", "this is label 141",
"this is label 1", "this is label 12", "this is label 6",
"this is label 2", "this is label 3", "this is label 5",
"this is label 4", "this is label 45", "this is label 52",
"this is label 26", "this is label 77", "this is label 8",
"this is label 7", "this is label 10", "this is label 14",
"this is label 31", "this is label 59", "this is label 178",
"this is label 18", "this is label 27", "this is label 42",
"this is label 70", "this is label 29", "this is label 37",
"this is label 330", "this is label 78", "this is label 25",
"this is label 34", "this is label 21", "this is label 450",
"this is label 83", "this is label 185", "this is label 57",
"this is label 16", "this is label 50", "this is label 126",
"this is label 895", "this is label 63", "this is label 402",
"this is label 19", "this is label 724", "this is label 40",
"this is label 11", "this is label 43", "this is label 758",
"this is label 1099", "this is label 73", "this is label 62",
"this is label 46", "this is label 183", "this is label 819",
"this is label 295", "this is label 1100", "this is label 17",
"this is label 282", "this is label 153", "this is label 1101",
"this is label 41", "this is label 1102", "this is label 446",
"this is label 216", "this is label 13", "this is label 109",
"this is label 20"), n = c(774L, 635L, 618L, 495L, 329L,
284L, 259L, 217L, 197L, 181L, 163L, 163L, 162L, 160L, 138L,
124L, 114L, 112L, 110L, 107L, 99L, 98L, 97L, 92L, 85L, 84L,
84L, 78L, 74L, 72L, 68L, 67L, 66L, 66L, 65L, 60L, 60L, 60L,
58L, 57L, 55L, 51L, 51L, 51L, 50L, 50L, 48L, 47L, 47L, 46L,
46L, 44L, 44L, 44L, 43L, 43L, 43L, 43L, 42L, 41L, 41L, 41L,
41L, 41L, 1568L, 1366L, 1220L, 1012L, 687L, 682L, 633L, 516L,
464L, 374L, 372L, 326L, 326L, 304L, 293L, 292L, 274L, 261L,
259L, 257L, 236L, 232L, 229L, 223L, 223L, 221L, 221L, 213L,
210L, 205L, 198L, 191L, 189L, 167L, 165L, 164L, 146L, 142L,
140L, 140L, 139L, 136L, 134L, 129L, 122L, 121L, 115L, 115L,
115L, 113L, 112L, 110L, 110L, 109L, 107L, 104L, 103L, 102L,
99L, 99L, 99L, 97L, 96L, 93L, 426L, 332L, 310L, 290L, 197L,
166L, 147L, 134L, 125L, 113L, 105L, 104L, 97L, 83L, 78L,
77L, 77L, 74L, 69L, 69L, 69L, 69L, 68L, 61L, 61L, 59L, 59L,
58L, 58L, 58L, 57L, 57L, 56L, 54L, 51L, 48L, 47L, 46L, 43L,
42L, 38L, 38L, 36L, 34L, 34L, 33L, 32L, 32L, 32L, 32L, 31L,
29L, 29L, 28L, 28L, 27L, 27L, 27L, 27L, 27L, 26L, 26L, 25L,
24L, 37L, 26L, 26L, 20L, 19L, 18L, 17L, 15L, 14L, 12L, 12L,
12L, 12L, 12L, 11L, 10L, 9L, 9L, 9L, 9L, 8L, 7L, 7L, 7L,
7L, 7L, 7L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 3L), rank = c(1L, 2L,
3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L,
16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L,
28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L, 38L, 39L,
40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L, 50L, 51L,
52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L,
64L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L,
14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L,
26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 37L,
38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 48L, 49L,
50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L, 60L, 61L,
62L, 63L, 64L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L,
12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L,
24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L,
36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L,
48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 57L, 58L, 59L,
60L, 61L, 62L, 63L, 64L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L,
9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L,
21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L,
33L, 34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L,
45L, 46L, 47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L,
57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L)), class = c("grouped_df",
"tbl_df", "tbl", "data.frame"), row.names = c(NA, -256L), groups = structure(list(
genAge = structure(1:4, .Label = c("Women, 15-19", "Women, 20-24",
"Women, 25-35", "Women, 36+"), class = "factor"), .rows = list(
1:64, 65:128, 129:192, 193:256)), row.names = c(NA, -4L
), class = c("tbl_df", "tbl", "data.frame"), .drop = TRUE))
ageGenderFLow <-
ageGenderF %>%
filter(genAge=="Women, 15-19") %>%
filter(rank<=10)
ageGenderFHigh <-
ageGenderF %>%
filter(genAge=="Women, 36+") %>%
filter(rank<=10)
ageGenderF_ <-
ageGenderF %>%
filter(word_ %in% ageGenderFLow$word_ |
word_ %in% ageGenderFHigh$word_)
# get rank order of words for low set
ageGenderFLowRank <-
ageGenderF_ %>%
filter(genAge=="Women, 15-19") %>%
arrange(rank) %>%
mutate(order = 1:n())
ageGenderF_ %>%
mutate(word = factor(word_, ordered=TRUE, levels=ageGenderFLowRank$word_)) %>%
# https://ibecav.github.io/slopegraph/
ggplot(., aes(x = genAge, y = reorder(rank, -rank), group = word_)) +
geom_line(aes(color = word_, alpha = 1), size = 1.5) +
#geom_line(size = 0.5, color="lightgrey") +
geom_text_repel(data = . %>% filter(genAge == "Women, 15-19"),
aes(label = word) ,
hjust = "left",
#fontface = "bold",
size = 3,
nudge_x = -3,
direction = "y") +
geom_text_repel(data = . %>% filter(genAge == "Women, 36+"),
aes(label = word) ,
hjust = "right",
#fontface = "bold",
size = 3,
nudge_x = 3,
direction = "y") +
geom_label(aes(label = rank),
size = 2.5,
label.padding = unit(0.15, "lines"),
label.size = 0.0) +
scale_x_discrete(position = "top") +
theme_bw() +
# Remove the legend
theme(legend.position = "none") +
# Remove the panel border
theme(panel.border = element_blank()) +
# Remove just about everything from the y axis
theme(axis.title.y = element_blank()) +
theme(axis.text.y = element_blank()) +
theme(panel.grid.major.y = element_blank()) +
theme(panel.grid.minor.y = element_blank()) +
# Remove a few things from the x axis and increase font size
theme(axis.title.x = element_blank()) +
theme(panel.grid.major.x = element_blank()) +
theme(axis.text.x.top = element_text(size=10)) +
# Remove x & y tick marks
theme(axis.ticks = element_blank()) +
# Format title & subtitle
theme(plot.title = element_text(size=10, face = "bold", hjust = 0.5)) +
theme(plot.subtitle = element_text(hjust = 0.5))
```
最佳答案
如果你愿意改变你的方法,你可以做一个大的转换,把你用作标签的文本用作轴标签。您可以利用辅助轴为绘图的每一侧做单独的标签,因此事情看起来很像您现在正在做的事情。
我看到的优点是文本适合,因为它现在是轴的一部分。
首先这是一个使用 rank
的例子作为一个因素。您必须通过 as.numeric()
将因子变成数字。为了获得重复的轴(到目前为止离散轴没有辅助轴)。然后需要做一些工作来获取每一侧的轴的中断和标签,所以我将数据操作移到第二步(并将 rank2
作为重新排序的因素,以便于稍后执行 breaks
)。
还要注意 expand
的使用在 scale_x_discrete()
移除面板区域边缘周围的空间。
ageGenderF_ = ageGenderF_ %>%
ungroup() %>%
mutate(word = factor(word_, ordered = TRUE, levels = ageGenderFLowRank$word_),
rank2 = reorder(rank, -rank) )
ageGenderF_ %>%
# https://ibecav.github.io/slopegraph/
ggplot(., aes(x = genAge, y = as.numeric(rank2), group = word_)) +
geom_line(aes(color = word_, alpha = 1), size = 1.5) +
geom_label(aes(label = rank),
size = 2.5,
label.padding = unit(0.15, "lines"),
label.size = 0.0) +
scale_x_discrete(position = "top", expand = c(0, .05) ) +
scale_y_continuous(breaks = filter(ageGenderF_, genAge == "Women, 15-19") %>% pull(rank2) %>% as.numeric(),
labels = filter(ageGenderF_, genAge == "Women, 15-19") %>% pull(word),
sec.axis = dup_axis(~.,
breaks = filter(ageGenderF_, genAge == "Women, 36+") %>% pull(rank2) %>% as.numeric(),
labels = filter(ageGenderF_, genAge == "Women, 36+") %>% pull(word) ) ) +
theme_bw() +
# Remove the legend
theme(legend.position = "none",
# Remove the panel border
panel.border = element_blank(),
# Remove just about everything from the y axis
axis.title.y = element_blank(),
panel.grid.major.y = element_blank(),
panel.grid.minor.y = element_blank(),
# Remove a few things from the x axis and increase font size
axis.title.x = element_blank(),
panel.grid.major.x = element_blank(),
axis.text.x.top = element_text(size=10),
# Remove x & y tick marks
axis.ticks = element_blank(),
axis.ticks.length = unit(0, "cm"),
# Format title & subtitle
plot.title = element_text(size=10, face = "bold", hjust = 0.5),
plot.subtitle = element_text(hjust = 0.5) )
rank
做同样的事情作为数字,使用
scale_y_reverse()
反转 y 轴。
ageGenderF_ = ageGenderF_ %>%
ungroup() %>%
mutate(word = factor(word_, ordered = TRUE, levels = ageGenderFLowRank$word_))
ageGenderF_ %>%
# https://ibecav.github.io/slopegraph/
ggplot(., aes(x = genAge, y = rank, group = word_)) +
geom_line(aes(color = word_, alpha = 1), size = 1.5) +
geom_label(aes(label = rank),
size = 2.5,
label.padding = unit(0.15, "lines"),
label.size = 0.0) +
scale_x_discrete(position = "top", expand = c(0, .05) ) +
scale_y_reverse(breaks = filter(ageGenderF_, genAge == "Women, 15-19") %>% pull(rank),
labels = filter(ageGenderF_, genAge == "Women, 15-19") %>% pull(word),
sec.axis = dup_axis(~.,
breaks = filter(ageGenderF_, genAge == "Women, 36+") %>% pull(rank),
labels = filter(ageGenderF_, genAge == "Women, 36+") %>% pull(word) ) ) +
theme_bw() +
# Remove the legend
theme(legend.position = "none",
# Remove the panel border
panel.border = element_blank(),
# Remove just about everything from the y axis
axis.title.y = element_blank(),
panel.grid.major.y = element_blank(),
panel.grid.minor.y = element_blank(),
# Remove a few things from the x axis and increase font size
axis.title.x = element_blank(),
panel.grid.major.x = element_blank(),
axis.text.x.top = element_text(size=10),
# Remove x & y tick marks
axis.ticks = element_blank(),
axis.ticks.length = unit(0, "cm"),
# Format title & subtitle
plot.title = element_text(size=10, face = "bold", hjust = 0.5),
plot.subtitle = element_text(hjust = 0.5) )
关于r - 缩小绘图宽度以为ggrepel标签腾出更多空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55384895/
运行 Tomcat 失败并出现 java.lang.OutOfMemoryError - 与缺少 PermGen 空间相关的错误。 我最近将 Tomcat 更改为以自己的用户(而非 root)运行。
我们有一个表,其中包含数百万行,其中包含 PostGIS 几何图形。我们要执行的查询是:落在边界几何内的最新条目是什么?这个查询的问题是我们经常会有大量的项目匹配边界框(半径大约为 5 公里),然后
我有一个Elasticsearch设置,它将允许用户搜索通配符作为索引。 array:3 [ "index" => "users" "type" => "user" "body" => arra
我创建了一个表,其中每行包含两个按钮,并且两个按钮连接在一起,我想将两个按钮分开。我用过 不起作用,css 也是,这是他们的另一种方式。 我有另一个问题,因为我不想在表格边框内显示操作按钮,而是在靠近
我试图在 jQuery Mobile 中的两个按钮之间留出空白。现实中的布局是这样的: Button 1 Button 2 (Hidden w/ display: none)
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
您好,我对图表应用程序还很陌生。现在我为我的应用程序创建了条形图。当我运行 create bar chart as separate project 时,输出如下所示。 然后当我将条形图与我的应用程序
我在使用 H2 和 GeoDB(内存中,junit)时遇到问题。 另外,使用 Hibernate 5(每个包的最新版本,包括 hibernate-spatial)和 Spring 4。 通过 id 实
我想画一张澳大利亚的 map ,并将每个城市表示为一个点。 然后突出显示人口众多(> 1M)的城市 library(sp) library(maps) data(canada.cities) head
关闭。这个问题是opinion-based .它目前不接受答案。 想改进这个问题?更新问题,以便 editing this post 提供事实和引用来回答它. 6年前关闭。 Improve this
如何保持.txt文件中存在的空格?在.txt文件中,它表示: text :text text1 :text1 text23 :text2 text345 :text3 如果我写这段
以下哪个键最大? 选项 1:16 个数字 [0,9] 选项 2:30 个元音 选项 3:字母表中的 16 个字母 选项 4:32 位 有人可以帮助我,告诉我哪一个是正确的答案以及我们如何计算它吗?我知
在 Unity 3d 中使用 Azure 空间 anchor 来实现在 iOS 和 Android 上部署的室内和室外增强现实体验是否有益? 最佳答案 是的,对于 Azure Spatial Anch
我有一个绝对定位的圆形图像。图像只需占据屏幕宽度的 17%,并且距离顶部 5 个像素。 问题是,当我调整图像大小以占据屏幕宽度的 17% 时,它会这样做,但同时容器会变长。图像本身不会拉伸(stret
我在 Ubuntu 14.04 上使用 Cassandra。从文档中,我可以看到运行命令: nodetool snapshot 创建我的 key 空间的快照。 命令的输出是: nodetool sn
Heroku引入了“私有(private)空间”,是否可以将现有应用迁移到私有(private)空间? https://blog.heroku.com/archives/2015/9/10/herok
是否允许在语义记录中使用非绑定(bind)空格 或其他 HTML 编码字符?我遇到的问题是 ; 字符被软件视为记录的结尾。 例如:假设我有一份婚姻记录,其中包含 2 个结婚者的姓氏、结婚年份以及结
我正在研究“智能 parking ”项目,偶然发现了包含我们真正需要的YouTube视频。我们已经实现了第一部分,即从视频源进行实时透视变换,下一步是将其定义为一组矩形 我基本上需要知道他是如何做到的
我有两个类:Engine 和 Trainset(多个单元),这两个类共享其 ID 空间,其中包含名称和系列 id=- . 这是我的Engine类(它是抽象的,因为有引擎的子类型(DieselEngin
如果有人能帮助我,那就太好了。 我正在尝试使用Java的Split命令,使用空格分割字符串,但问题是,字符串可能没有空格,这意味着它将只是一个简单的顺序(而不是“输入2”将是“退出”) Scanner
我是一名优秀的程序员,十分优秀!