1

I noticed that this cool example from ExamplePlots.jl within the JuliaPlots repository uses many Plots.jl methods that are not mentioned in the documentation; for example, curve_points(), BezierCurve(), zip(), unzip(), and partialcircle(). This leads me to believe that Plots.jl has a whole lot of functionality that I'm not aware of. Is there a list of all the Plots.jl functions anywhere?

tparker
  • 689
  • 1
  • 6
  • 17

2 Answers2

2

Plots honestly has shedloads of undocumented functionality. In addition to the exported functions, there are also a number of useful unexported functions (e.g. the other day I fell over Plots.abline! for plotting lines with a slope and intercept). And the entire color gradient support (which is extensive) is largely undocumented.

In fact, one of the very best sources of info on Plots is the ExamplePlots repo where you did look, but I don't know how many get there.

You can get the exported functions with whos(Plots), of course, but many of the functions don't have docstrings. We should probably have a list of functions, or (possibly better) incorporate more of them into the 'examples' section of the homepage.

The path ahead is to open an issue on PlotDocs; and then for those of us who know Plots well, and spend time improving it, to start weighing documentation higher than functionality, at least for a time.

Michael K. Borregaard
  • 7,864
  • 1
  • 28
  • 35
  • Do you know if anything in the ExamplePlots repo does a good job presenting the color gradient functionality? It could be useful for my work to plot a scatter plot where the marker colors change continuously as you go across the series. – tparker Aug 12 '17 at 17:33
  • 1
    `scatter(randn(100), randn(100), marker_z = 1:100)`? – Michael K. Borregaard Aug 13 '17 at 12:13
  • That works, thanks! And it's even (briefly) mentioned in the documentation! ;) – tparker Aug 17 '17 at 00:17
1

There's no such thing as a complete list of Plots.jl functionality since anyone can add a recipe to extend the functionality of Plots.jl. So things like StatPlots.jl "look like" Plots.jl functionality, but in reality those are "just core user addons" in some sense.

zip(), unzip()

Those are part of Julia Base.

Chris Rackauckas
  • 18,645
  • 3
  • 50
  • 81
  • 2
    `zip()` is part of Julia Base, but `unzip()` is not. – tparker Aug 12 '17 at 02:15
  • 2
    I don't quite understand what you mean. Of course anyone can create their own recipe, but only certain recipes make it onto the master branch of the GitHub repository that you get when you run `Pkg.add("Plots")`. It seems to me that the most logical scope of the documentation is everything on the master branch of the GitHub repo. – tparker Aug 16 '17 at 23:37