Skip to content

Commit b00d344

Browse files
committed
Add Logarithmic curves
1 parent 8933f00 commit b00d344

File tree

6 files changed

+44
-0
lines changed

6 files changed

+44
-0
lines changed

logarithmic-curves/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Curvas Logaritimicas
2+
3+
Plotando num arquivo quatro curvas logaritimicas.
4+
5+
## Instalação
6+
7+
Instale o R ([detalhes de como fazer isso podem ser encontrados no site oficial do R](https://cran.r-project.org/)). Para rodar o script daqui você não vai precisar de nenhum pacote extra 😉
8+
9+
## Arquivos
10+
11+
- `log_curves.R`: Rscript que gera 4 plots: um para cada curva de `Log`
12+
13+
## Usando o script
14+
15+
No seu terminal rode:
16+
17+
```console
18+
$ Rscript log_curves.R
19+
```
Loading
34.3 KB
Loading
Loading

logarithmic-curves/log-x-curve.png

32.5 KB
Loading

logarithmic-curves/log_curves.R

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#! /usr/bin/env Rscript
2+
3+
png(filename="log-x-curve.png",
4+
width=780,
5+
height=780)
6+
curve(log(x), 1, 100, col = "red", lwd=2, main="Logarithmic Curve")
7+
dev.off()
8+
9+
png(filename="log-1-over-x-curve.png",
10+
width=780,
11+
height=780)
12+
curve(log(1/x), 1, 100, col = "red", lwd=2, main="Logarithmic Curve")
13+
dev.off()
14+
15+
png(filename="log-1-minus-1-over-x-curve.png",
16+
width=780,
17+
height=780)
18+
curve(log(1 - 1/x), 1, 100, col = "red", lwd=2, main="Logarithmic Curve")
19+
dev.off()
20+
21+
png(filename="log-1-plus-1-over-x-curve.png",
22+
width=780,
23+
height=780)
24+
curve(log(1 + 1/x), 1, 100, col = "red", lwd=2, main="Logarithmic Curve")
25+
dev.off()

0 commit comments

Comments
 (0)