本文件来自维基共享资源并可能被其他项目使用。
其文件描述页上的描述显示在下面。
摘要
R code
library(ggplot2)
f <- function(x, beta0) {
(1 / 3) * x ^ 3 - (1 / 2) * x ^ 2 - 2 * x + beta0
}
d <-
expand.grid(x = seq(-4, 4, 0.01), Intercept = c(-4, 0, 4))
d$y <- with(d, f(x, Intercept))
d.slope <-
expand.grid(x = seq(-4, 4, 0.5),
y = seq(-10, 10, 0.5))
d.slope$slope <- with(d.slope, x ^ 2 - x - 2)
d.slope$angle <- with(d.slope, atan(slope) / pi * 180)
ggplot(d, aes(x, y)) +
geom_hline(yintercept = 0) +
geom_vline(xintercept = 0) +
geom_text(data = d.slope,
aes(angle = angle, label = "—"),
color = 3,
size = 2.5) +
geom_line(aes(color = as.factor(Intercept), group = as.factor(Intercept), size = as.factor(Intercept))) +
scale_x_continuous("x", breaks = seq(-5, 5, 1)) +
scale_y_continuous("y", breaks = seq(-50, 50, 1), limits = c(-8, 6)) +
theme(panel.background = element_blank()) +
theme(text = element_text(size = 12)) +
theme(legend.position = "top") +
scale_color_manual(values = c('green', 'red', 'blue')) +
scale_size_manual(values = 1:3) +
guides(size = guide_legend("Intercept"), color = guide_legend("Intercept")) +
coord_fixed() +
windows(5, 6)
许可协议
我,本作品著作权人,特此采用以下许可协议发表本作品:
|
本作品采用知识共享CC0 1.0 通用公有领域贡献许可协议授权。
|
| 采用本宣告发表本作品的人,已在法律允许的范围内,通过在全世界放弃其对本作品拥有的著作权法规定的所有权利(包括所有相关权利),将本作品贡献至公有领域。您可以复制、修改、传播和表演本作品,将其用于商业目的,无需要求授权。
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse
|
Slope field of dy/dx = 2*x^2 − x − 2
文件历史
点击某个日期/时间查看对应时刻的文件。
| 日期/时间 | 缩略图 | 大小 | 用户 | 备注 |
| 当前 | 2021年11月1日 (一) 12:20 |  | 289 × 526(364 KB) | wikimediacommons>Chen-Pan Liao | fixes |
文件用途