Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add pt-br translations #132

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2500095
traduz README.md
giovana-morais May 6, 2023
c3fa801
traduz dicas de iniciante
giovana-morais May 6, 2023
300f815
finaliza readme
giovana-morais May 7, 2023
daab774
feat: create specific files for the translation
giovana-morais May 8, 2023
273f837
rollback translated files
giovana-morais May 8, 2023
9e3aba6
Update handout-intermediate.pt-br.tex
R-it-a May 10, 2023
05761be
Update handout-intermediate.pt-br.tex
R-it-a May 10, 2023
20c4ded
Update handout-intermediate.pt-br.tex
R-it-a May 10, 2023
4378707
finish handout-tips translation
giovana-morais May 15, 2023
20180ba
Merge branch 'master' of github.com:giovana-morais/matplotlib-dicas
giovana-morais May 15, 2023
62b3895
Update README.pt-br.md
giovana-morais May 24, 2023
e84562d
Update README.pt-br.md
giovana-morais May 24, 2023
88c4e92
Update README.pt-br.md
giovana-morais May 24, 2023
91b08cd
Update handout-intermediate.pt-br.tex
giovana-morais May 24, 2023
aa08583
Update handout-beginner.pt-br.tex
giovana-morais May 24, 2023
8218f47
Update handout-beginner.pt-br.tex
giovana-morais May 24, 2023
c158175
Update handout-beginner.pt-br.tex
giovana-morais May 24, 2023
67b151f
Update handout-beginner.pt-br.tex
giovana-morais May 24, 2023
37f1656
Update README.pt-br.md
giovana-morais Jul 19, 2023
27791eb
Update README.pt-br.md
giovana-morais Jul 19, 2023
8a2f862
Update README.pt-br.md
giovana-morais Jul 19, 2023
6dad15f
doc: add 3D detail in beginner handout
giovana-morais Jul 19, 2023
4ac511e
fix: seaborn-style.pdf path
giovana-morais Oct 10, 2023
790b7fa
add missing pieces
giovana-morais Oct 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
# Cheatsheets for Matplotlib users
# Folhas de dicas para usuários do Matplotlib

## Cheatsheets
Cheatsheet [(download pdf)](https://matplotlib.org/cheatsheets/cheatsheets.pdf) | |
## Observação
O conteúdo original dessa folha de dicas é do repositório [oficial do
`matplotlib`](https://github.com/matplotlib/cheatsheets). Essa tradução
não-oficial visa tornar mais acessível as dicas para os usuários e usuárias
do `matplotlib`.

Façam bom uso!

## Folhas de dicas
Cheatsheet [(baixe o pdf)](https://matplotlib.org/cheatsheets/cheatsheets.pdf) | |
:------------------------------------------------------------------------------:|:----------------------------------------------------------:
![](https://matplotlib.org/cheatsheets/cheatsheets-1.png) | ![](https://matplotlib.org/cheatsheets/cheatsheets-2.png)

## Handouts
## Folhetos

Beginner handout [(download pdf)](https://matplotlib.org/cheatsheets/handout-beginner.pdf) | Intermediate handout [(download pdf)](https://matplotlib.org/cheatsheets/handout-intermediate.pdf) | Tips handout [(download pdf)](https://matplotlib.org/cheatsheets/handout-tips.pdf)
Folheto iniciante [(download pdf)](https://matplotlib.org/cheatsheets/handout-beginner.pdf) | Folheto intermediário[(download pdf)](https://matplotlib.org/cheatsheets/handout-intermediate.pdf) | Folheto de dicas [(download pdf)](https://matplotlib.org/cheatsheets/handout-tips.pdf)
:-----------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------:
![](https://matplotlib.org/cheatsheets/handout-beginner.png) | ![](https://matplotlib.org/cheatsheets/handout-intermediate.png) | ![](https://matplotlib.org/cheatsheets/handout-tips.png)

# For contributors to the cheatsheets
# Para contribuídores das dicas

## How to compile
## Como compilar

1. You need to create a `fonts` repository with:
1. Você precisa criar um repositório `fonts`com:

* `fonts/roboto/*` : See https://fonts.google.com/specimen/Roboto
or https://github.com/googlefonts/roboto/tree/master/src/hinted
Expand All @@ -30,12 +38,14 @@ Beginner handout [(download pdf)](https://matplotlib.org/cheatsheets/handout-beg
* `fonts/eb-garamond/*` : See https://bitbucket.org/georgd/eb-garamond/src/master
* `fonts/pacifico/*` : See https://fonts.google.com/download?family=Pacifico

On Linux, with `make` installed, the fonts can be set up with the following command:
No Linux, com o `make` instalado, as fontes podem ser configuradas com o seguinte comando:

```shell
make -C fonts
```

The fonts can be made discoverable by `matplotlib` (through `fontconfig`) by creating the following in `$HOME/.config/fontconfig/fonts.conf` (see [here](https://www.freedesktop.org/software/fontconfig/fontconfig-user.html)):
As fontes podem ser descobertas pelo `matplotlib` (por via do `fontconfig`) ao
criar o seguinte `$HOME/.config/fontconfig/fonts.conf` (veja [aqui](https://www.freedesktop.org/software/fontconfig/fontconfig-user.html)):

```xml
<?xml version="1.0"?>
Expand All @@ -47,15 +57,15 @@ The fonts can be made discoverable by `matplotlib` (through `fontconfig`) by cre
```


2. You need to generate all the figures:
2. Você precisa gerar todas as figuras:

```
$ cd scripts
$ for script in *.py; do python $script; done
$ cd ..
```

3. Compile the sheet
3. Compile a folha
```
$ xelatex cheatsheets.tex
$ xelatex cheatsheets.tex
Expand Down
30 changes: 15 additions & 15 deletions handout-beginner.tex
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ \section*{\LARGE \rmfamily

\begin{multicols*}{3}

Matplotlib is a library for making 2D plots in Python. It is designed
with the philosophy that you should be able to create simple plots
with just a few commands:\\
Matplotlib é uma biblioteca para gerar plots em 2D em Python. Foi desenhado
com a filosofia de que você deve ser capaz de criar plots simples com apenas
alguns comandos:\\

\fbox{1} \textbf{Initialize}
\fbox{1} \textbf{Inicialize}
\begin{lstlisting}
import numpy as np
import matplotlib.pyplot as plt
Expand All @@ -87,7 +87,7 @@ \section*{\LARGE \rmfamily
Y = np.sin(X)
\end{lstlisting}
%
\fbox{3} \textbf{Render}
\fbox{3} \textbf{Renderize}
\begin{lstlisting}
fig, ax = plt.subplots()
ax.plot(X, Y)
Expand All @@ -98,10 +98,10 @@ \section*{\LARGE \rmfamily
\includegraphics[width=\linewidth]{sine.pdf}

% -----------------------------------------------------------------------------
\subsection*{\rmfamily Choose}
\subsection*{\rmfamily Escolha}
% -----------------------------------------------------------------------------

Matplotlib offers several kind of plots (see Gallery): \medskip
Matplotlib oferece diversos tipos de plots (veja Galeria): \medskip

\begin{tabular}{@{}m{.821\linewidth}m{.169\linewidth}}
\begin{lstlisting}[belowskip=-\baselineskip]
Expand Down Expand Up @@ -179,9 +179,9 @@ \subsection*{\rmfamily Choose}
% -----------------------------------------------------------------------------
\subsection*{\rmfamily Tweak}
% -----------------------------------------------------------------------------
You can modify pretty much anything in a plot, including limits,
colors, markers, line width and styles, ticks and ticks labels,
titles, etc. \medskip
Você pode modificar praticamente tudo em um plot, incluindo limites,
cores, marcadores, grossura e estilo de linhas, ticks e rótulos de ticks,
títulos, etc. \medskip

% -----------------------------------------------------------------------------
\begin{tabular}{@{}m{.821\linewidth}m{.169\linewidth}}
Expand Down Expand Up @@ -225,8 +225,8 @@ \subsection*{\rmfamily Tweak}
\subsection*{\rmfamily Organize}
% -----------------------------------------------------------------------------

You can plot several data on the the same figure, but you can also
split a figure in several subplots (named {\em Axes}): \medskip
Você pode plotar diferentes dados na mesma figura, mas você também
pode dividir uma figura em diversos subplots (chamados {\em Axes}): \medskip

% -----------------------------------------------------------------------------
\begin{tabular}{@{}m{.821\linewidth}m{.169\linewidth}}
Expand Down Expand Up @@ -264,7 +264,7 @@ \subsection*{\rmfamily Label \mdseries (everything)}
\begin{lstlisting}[belowskip=-\baselineskip]
ax.plot(X, Y)
fig.suptitle(None)
ax.set_title("A Sine wave")
ax.set_title("Uma senoide")
\end{lstlisting}
& \raisebox{-0.75em}{\includegraphics[width=\linewidth]{plot-title.pdf}}
\end{tabular}
Expand All @@ -290,8 +290,8 @@ \subsection*{\rmfamily Explore}
\subsection*{\rmfamily Save \mdseries (bitmap or vector format)}
% -----------------------------------------------------------------------------
\begin{lstlisting}[belowskip=-\baselineskip]
fig.savefig("my-first-figure.png", dpi=300)
fig.savefig("my-first-figure.pdf")
fig.savefig("minha-primeira-figura.png", dpi=300)
fig.savefig("minha-primeira-figura.pdf")
\end{lstlisting}
%
\vfill
Expand Down