-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a step towards fixing #44 (almost there!). 1. New user-facing plot/plot3 constructor is ```julia Plot([incrementa], [options], data, trailing...) ``` and similarly for `Plot3`. `incremental` defaults to `false`, as this seems to be the most common use case. Some validation is done on `data` (checking for type). This removes the `label` kwarg, and allows us to close #16. Examples now recommend an explicit `\addlegendentry`. Docstrings are added for everything, and examples are rewritten accordingly. 2. Axis-like code cleaned up a bit with macros. Variations on log axes added. Explicitly document that strings are emitted as is. 3. GroupPlot rewritten, allow multiple plots and empty \nextgroupplot, two examples added, one from the manual and one for multiple plots. 4. Replaced random examples with deterministic ones, perhaps stick to this and close #63? Minor indentation issues fixed. 5. Minor fixes for testing framework.
- Loading branch information
Showing
10 changed files
with
333 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Axis-like objects | ||
|
||
```@setup pgf | ||
using PGFPlotsX | ||
savefigs = (figname, obj) -> begin | ||
PGFPlotsX.save(figname * ".pdf", obj) | ||
run(`pdf2svg $(figname * ".pdf") $(figname * ".svg")`) | ||
PGFPlotsX.save(figname * ".tex", obj); | ||
return nothing | ||
end | ||
``` | ||
------------------------ | ||
|
||
```@example pgf | ||
x = linspace(0, 2*pi, 100) | ||
@pgf GroupPlot( | ||
{ | ||
group_style = | ||
{ | ||
group_size="2 by 1", | ||
xticklabels_at="edge bottom", | ||
yticklabels_at="edge left" | ||
}, | ||
no_markers | ||
}, | ||
{}, | ||
Plot(true, Table(x, sin.(x))), | ||
Plot(true, Table(x, sin.(x .+ 0.5))), | ||
{}, | ||
Plot(true, Table(x, cos.(x))), | ||
Plot(true, Table(x, cos.(x .+ 0.5)))) | ||
savefigs("groupplot-multiple", ans) # hide | ||
``` | ||
|
||
[\[.pdf\]](groupplot-multiple.pdf), [\[generated .tex\]](groupplot-multiple.tex) | ||
|
||
![](groupplot-multiple.svg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.