파일:Comparison of simple power law curves in original and log-log scale.png
이 파일은 위키미디어 공용에 있으며, 다른 프로젝트에서 사용하고 있을 가능성이 있습니다. 해당 파일에 대한 설명이 아래에 나와 있습니다.
파일 설명
| 설명Comparison of simple power law curves in original and log-log scale.png |
English: R code to reproduce the image:
``` options( repr.plot.width = 10, # in inches (default = 7) repr.plot.height = 13 # in inches (default = 7) ) library(ggplot2) library(gridExtra)
linear_function <- function(x) x concave_function <- function(x) sqrt(x) convex_function <- function(x) x^2 identity_line <- function(x) x
x_values <- seq(0.001, 10, length.out = 1000) data_linear <- data.frame(x = x_values, y = linear_function(x_values)) data_concave <- data.frame(x = x_values, y = concave_function(x_values)) data_convex <- data.frame(x = x_values, y = convex_function(x_values))
plot_linear <- ggplot(data_linear, aes(x, y)) + geom_line() +
geom_abline(intercept = 0, slope = 1, linetype = "dashed", color = "red") +
ggtitle("Linear: y = x") + ylim(0,10) + xlim(0,10)
plot_concave <- ggplot(data_concave, aes(x, y)) + geom_line() +
geom_abline(intercept = 0, slope = 1, linetype = "dashed", color = "red") +
ggtitle("Concave: y = x^(1/2)") + ylim(0,10) + xlim(0,10)
plot_convex <- ggplot(data_convex, aes(x, y)) + geom_line() +
geom_abline(intercept = 0, slope = 1, linetype = "dashed", color = "red") +
ggtitle("Convex: y = x^2") + ylim(0,10) + xlim(0,10)
data_linear_log <- data.frame(x = log10(x_values), y = log10(linear_function(x_values))) data_concave_log <- data.frame(x = log10(x_values), y = log10(concave_function(x_values))) data_convex_log <- data.frame(x = log10(x_values), y = log10(convex_function(x_values))) plot_linear_log <- ggplot(data_linear_log, aes(x, y)) + geom_line() +
geom_abline(intercept = 0, slope = 1, linetype = "dashed", color = "red") +
ggtitle("Linear (Log10-Log10): y = x") + ylim(0,1) + xlim(0,1)
plot_concave_log <- ggplot(data_concave_log, aes(x, y)) + geom_line() +
geom_abline(intercept = 0, slope = 1, linetype = "dashed", color = "red") +
ggtitle("Concave (Log10-Log10): y = x^(1/2)") + ylim(0,1) + xlim(0,1)
plot_convex_log <- ggplot(data_convex_log, aes(x, y)) + geom_line() +
geom_abline(intercept = 0, slope = 1, linetype = "dashed", color = "red") +
ggtitle("Convex (Log10-Log10): y = x^2") + ylim(0,1) + xlim(0,1)
grid.arrange(plot_linear, plot_linear_log, plot_concave, plot_concave_log,
plot_convex, plot_convex_log,
ncol = 2, top = "Comparison of Linear, Concave, and Convex Functions\nIn original (left) and log10 (right) scales")
``` The R code provided above generates a grid of six plots, arranged in two columns and three rows, showcasing different mathematical functions both in their original scale and in a log10-log10 scale. The functions displayed include a linear function (y = x), a concave function (y = sqrt(x)), and a convex function (y = x^2). Each of these functions is depicted in two plots: one showing the relationship in its original scale and the other showing the relationship in a log10-log10 scale. In each plot: - The data is represented by a black line. - A dashed red line is included in each plot, representing a line with a 0 intercept and a slope of 1, for reference. - The x-axis and y-axis are labeled appropriately, with the axes in the log10-log10 plots labeled as log10(x) and log10(y). - Each plot has a title describing the function and indicating whether it is in the original scale or in the log10-log10 scale. This visualization serves to demonstrate how different types of mathematical relationships are represented both in their normal scale and when transformed into a logarithmic scale. |
| 날짜 | |
| 출처 | 자작 |
| 저자 | Talgalili |
라이선스
- 이용자는 다음의 권리를 갖습니다:
- 공유 및 이용 – 저작물의 복제, 배포, 전시, 공연 및 공중송신
- 개작 – 저작물의 개작, 수정, 2차적저작물 창작
- 다음과 같은 조건을 따라야 합니다:
- 저작자표시 – 적절한 저작자 표시를 제공하고, 라이선스에 대한 링크를 제공하고, 변경사항이 있는지를 표시해야 합니다. 당신은 합리적인 방식으로 표시할 수 있지만, 어떤 방식으로든 사용권 허가자가 당신 또는 당신의 사용을 지지하는 방식으로 표시할 수 없습니다.
- 동일조건변경허락 – 만약 당신이 이 저작물을 개작 또는 변형하거나 이 저작물을 기반으로 제작하는 경우, 당신은 당신의 기여물을 원저작물과 동일하거나 호환 가능한 라이선스에 따라 배포하여야 합니다.
설명
이 파일에 묘사된 항목
다음을 묘사함
4 3 2024
image/png
113,036 바이트
1,560 화소
1,200 화소
파일 역사
날짜/시간 링크를 클릭하면 해당 시간의 파일을 볼 수 있습니다.
| 날짜/시간 | 섬네일 | 크기 | 사용자 | 설명 | |
|---|---|---|---|---|---|
| 현재 | 2024년 3월 4일 (월) 14:21 | 1,200 × 1,560 (110 KB) | wikimediacommons>Talgalili | Uploaded own work with UploadWizard |
이 파일을 사용하는 문서
이 파일을 사용하는 문서가 없습니다.