You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -214,7 +216,7 @@ After running these commands, `git remote -v` should show two remotes: `origin`
214
216
215
217
If you're just starting work on a new feature:
216
218
217
-
```
219
+
```bash
218
220
git fetch origin
219
221
git checkout master
220
222
git merge --ff-only origin/master
@@ -228,7 +230,7 @@ The first three lines are meant to ensure you start from the main repo's master
228
230
229
231
If you have an ongoing development branch (say, `user123-dev`) which you'd prefer to use (and which has previously been merged into master!) then you can get that up to date with:
230
232
231
-
```
233
+
```bash
232
234
git fetch origin
233
235
git checkout user123-dev
234
236
git merge --ff-only origin/master
@@ -239,7 +241,7 @@ We update our local copy of origin, checkout the dev branch, then attempt to "fa
239
241
240
242
#### Write code, and format
241
243
242
-
Power up your favorite editor (maybe [Juno](https://junolab.org/)?) and make some code changes to the repo.
244
+
Power up your favorite editor (maybe [Juno](https://junolab.org)?) and make some code changes to the repo.
243
245
244
246
Format your changes (code style consistency) using:
After applying changes, you'll want to "commit" or save a snapshot of all the changes you made. After committing, you can "push" those changes to your forked repo on Github:
252
254
253
-
```
255
+
```bash
254
256
git add src/my_new_file.jl
255
257
git commit -am "my commit message"
256
258
git push forked user123-dev
257
259
```
258
260
261
+
`Plots` has some [pre-commit](https://pre-commit.com) hooks configuration set in order to enhance code quality.
262
+
One can run the `pre-commit` checks using `pre-commit run --all-files`, they should be automatically ran when using `git commit` if installed.
263
+
259
264
The first line is optional, and is used when adding new files to the repo. The `-a` means "commit all my changes", and the `-m` lets you write a note about the commit (you should always do this, and hopefully make it descriptive).
260
265
261
266
#### Submit a PR
@@ -268,7 +273,7 @@ Make sure the "base" branch is JuliaPlots `master` and the "compare" branch is `
268
273
269
274
After all of this, you will likely want to go back to using `master` (or possibly using a tagged release, once your feature is tagged). To clean up:
270
275
271
-
```
276
+
```bash
272
277
git fetch origin
273
278
git checkout master
274
279
git merge --ff-only origin/master
@@ -311,7 +316,7 @@ From the Julia REPL, run `Pkg.test(name="Plots")`. This will try to plot the te
311
316
312
317
After the reference images have been updated, navigate to PlotReferenceImages and push the changes to Github:
A control systems design toolbox for Julia. This toolbox works similar to that of other major computer-aided control systems design (CACSD) toolboxes. Systems can be created in either a transfer function or a state space representation. These systems can then be combined into larger architectures, simulated in both time and frequency domain, and analyzed for stability/performance properties.
Copy file name to clipboardExpand all lines: docs/src/output.md
-8Lines changed: 0 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,16 @@
1
-
2
1
# [Output](@id output)
3
2
4
-
5
3
**A Plot is only displayed when returned** (a semicolon will suppress the return), or if explicitly displayed with `display(plt)`, `gui()`, or by adding `show = true` to your plot command.
6
4
7
5
8
6
!!! tip
9
7
You can have MATLAB-like interactive behavior by setting the default value: default(show = true)
10
8
11
9
### Standalone window
12
-
13
10
Calling `gui(plt)` will open a standalone window. `gui()`, like `plot!(...)`, applies to the "current" Plot. Returning a Plot object to the REPL is like calling `gui(plt)`.
14
11
15
12
16
13
### Jupyter / IJulia
17
-
18
14
Plots are shown inline when returned to a cell. The default output format is `svg` for backends that support it.
19
15
This can be changed by the `html_output_format` attribute, with alias `fmt`:
20
16
@@ -23,12 +19,10 @@ plot(rand(10), fmt = :png)
23
19
```
24
20
25
21
### Juno / Atom
26
-
27
22
Plots are shown in the Atom PlotPane when possible, either when returned to the console or to an inline code block. At any time, the plot can be opened in a standalone window using the `gui()` command.
28
23
The PlotPane can be disabled in Juno's settings.
29
24
30
25
### savefig / format
31
-
32
26
Plots support 2 different versions per save-command.
33
27
Command `savefig` chooses file type automatically based on the file extension.
34
28
@@ -48,15 +42,13 @@ png(plot_ref, filename_string) # save the fig referenced by plot_ref as png with
48
42
```
49
43
50
44
#### File formats supported by most graphical backends
51
-
52
45
- png (default output format for `savefig`, if no file extension is given)
53
46
- svg
54
47
- PDF
55
48
56
49
When not using `savefig`, the default output format depends on the environment (e.g., when using IJulia/Jupyter).
57
50
58
51
#### Supported output file formats
59
-
60
52
Note: not all backends support every output file format !
61
53
A simple table showing which format is supported by which backend
Copy file name to clipboardExpand all lines: docs/src/recipes.md
-5Lines changed: 0 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,6 @@ using Plots; gr()
3
3
PlotsBase.reset_defaults()
4
4
```
5
5
6
-
7
6
# [Recipes](@id recipes)
8
7
9
8
Recipes are a way of defining visualizations in your own packages and code, without having to depend on Plots. The functionality relies on [RecipesBase](https://github.com/JuliaPlots/Plots.jl/tree/v2/RecipesBase), a super lightweight but powerful package which allows users to create advanced plotting logic without Plots. The `@recipe` macro in RecipesBase will add a method definition for `RecipesBase.apply_recipe`. Plots adds to and calls this same function, and so your package and Plots can communicate without ever knowing about the other. Magic!
@@ -37,17 +36,13 @@ If `MyVec` was a subtype of AbstractVector, there would not be anything to do...
37
36
38
37
Afterwards, all plot commands which work for vectors will also work for your datatype.
39
38
40
-
41
39
### Series Recipes
42
-
43
40
Lets quickly discuss a mainstay of data visualization: the histogram. Hadley Wickham has explored the nature of histograms as part of his [Layered Grammar of Graphics](https://vita.had.co.nz/papers/layered-grammar.pdf). In it, he discusses how a histogram is really nothing more than a bar graph which has its data pre-binned. This is true, and it can be taken further. A bar-graph is really an extension of a step-graph, in which zeros are interwoven among the x-values. A step-graph is really nothing more than a path (line) which can travel only horizontally or vertically. Of course, a similar decomposition could be had by treating the bars as filled polygons.
44
41
45
42
The point to be had is that a graphics package need only be able to draw lines and polygons, and they can support drawing a histogram. The path from data to histogram is normally very complicated, but we can avoid the complexity and define a recipe to convert it to its subcomponents. In a few lines of readable code, we can implement a key statistical visualization. See the [tutorial on series recipes](https://github.com/tbreloff/ExamplePlots.jl/tree/master/notebooks/series_recipes.ipynb) for a better understanding of how you might use them.
46
43
47
44
48
-
49
45
## Recipe Types
50
-
51
46
Above we described `Type recipes` and `Series Recipes`. In total there are four main types of recipes in Plots (listed in the order they are processed):
0 commit comments