diff --git a/src/examples.jl b/src/examples.jl index 88ef7f7c..a0e7bfc4 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -9,7 +9,7 @@ end # the _examples we'll run for each const _examples = PlotExample[ - PlotExample( + PlotExample( # 1 "Lines", "A simple line plot of the columns.", [:( @@ -18,7 +18,7 @@ const _examples = PlotExample[ end )], ), - PlotExample( + PlotExample( # 2 "Functions, adding data, and animations", """ Plot multiple functions. You can also put the function first, or use the form `plot(f, @@ -39,7 +39,7 @@ const _examples = PlotExample[ end )], ), - PlotExample( + PlotExample( # 3 "Parametric plots", "Plot function pair (x(u), y(u)).", [ @@ -58,7 +58,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 4 "Colors", """ Access predefined palettes (or build your own with the `colorscheme` method). @@ -89,7 +89,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 5 "Global", """ Change the guides/background/limits/ticks. Convenience args `xaxis` and `yaxis` allow @@ -121,13 +121,7 @@ const _examples = PlotExample[ ], ), - # PlotExample("Two-axis", - # "Use the `axis` arguments.", - # [ - # :(plot(Vector[randn(100), randn(100)*100], axis = [:l :r], ylabel="LEFT", yrightlabel="RIGHT", xlabel="X", title="TITLE")) - # ]), - - PlotExample( + PlotExample( # 6 "Images", "Plot an image. y-axis is set to flipped", [ @@ -142,7 +136,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 7 "Arguments", """ Plot multiple series with different numbers of points. Mix arguments that apply to all @@ -166,7 +160,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 8 "Build plot in pieces", "Start with a base plot...", [:( @@ -175,7 +169,7 @@ const _examples = PlotExample[ end )], ), - PlotExample( + PlotExample( # 9 "", "and add to it later.", [:( @@ -184,7 +178,7 @@ const _examples = PlotExample[ end )], ), - PlotExample( + PlotExample( # 10 "Histogram2D", "", [:( @@ -193,7 +187,7 @@ const _examples = PlotExample[ end )], ), - PlotExample( + PlotExample( # 11 "Line types", "", [ @@ -214,7 +208,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 12 "Line styles", "", [ @@ -237,7 +231,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 13 "Marker types", "", [ @@ -264,7 +258,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 14 "Bar", "`x` is the midpoint of the bar. (todo: allow passing of edges instead of midpoints)", [:( @@ -273,7 +267,7 @@ const _examples = PlotExample[ end )], ), - PlotExample( + PlotExample( # 15 "Histogram", "", [ @@ -288,7 +282,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 16 "Subplots", """ Use the `layout` keyword, and optionally the convenient `@layout` macro to generate @@ -310,7 +304,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 17 "Adding to subplots", """ Note here the automatic grid layout, as well as the order in which new series are added @@ -329,14 +323,20 @@ const _examples = PlotExample[ ), ], ), - PlotExample("", "", [:( - begin - using Random - Random.seed!(111) - plot!(Plots.fakedata(100, 10)) - end - )]), - PlotExample( + PlotExample( # 18 + "", + "", + [ + :( + begin + using Random + Random.seed!(111) + plot!(Plots.fakedata(100, 10)) + end + ) + ] + ), + PlotExample( # 19 "Open/High/Low/Close", """ Create an OHLC chart. Pass in a list of (open,high,low,close) tuples as your `y` @@ -365,7 +365,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 20 "Annotations", """ The `annotations` keyword is used for text annotations in data-coordinates. Pass in a @@ -408,7 +408,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 21 "Custom Markers", """A `Plots.Shape` is a light wrapper around vertices of a polygon. For supported backends, pass arbitrary polygons as the marker shapes. Note: The center is (0,0) and @@ -454,7 +454,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 22 "Contours", """ Any value for fill works here. We first build a filled contour from a function, then an @@ -474,7 +474,7 @@ const _examples = PlotExample[ end )], ), - PlotExample( + PlotExample( # 23 "Pie", "", [:( @@ -485,7 +485,7 @@ const _examples = PlotExample[ end )], ), - PlotExample( + PlotExample( # 24 "3D", "", [ @@ -511,7 +511,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 25 "DataFrames", "Plot using DataFrame column symbols.", [ @@ -534,7 +534,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 26 "Groups and Subplots", "", [ @@ -552,7 +552,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 27 "Polar Plots", "", [:( @@ -563,7 +563,7 @@ const _examples = PlotExample[ end )], ), - PlotExample( + PlotExample( # 28 "Heatmap, categorical axes, and aspect_ratio", "", [:( @@ -575,7 +575,7 @@ const _examples = PlotExample[ end )], ), - PlotExample( + PlotExample( # 29 "Layouts, margins, label rotation, title location", "", [ @@ -595,7 +595,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 30 "Boxplot and Violin series recipes", "", [ @@ -620,7 +620,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 31 "Animation with subplots", "The `layout` macro can be used to create an animation with subplots.", [ @@ -648,7 +648,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 32 "Spy", """ For a matrix `mat` with unique nonzeros `spy(mat)` returns a colorless plot. If `mat` has @@ -682,7 +682,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 33 "Magic grid argument", """ The grid lines can be modified individually for each axis with the magic `grid` argument. @@ -712,7 +712,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 34 "Framestyle", """ The style of the frame/axes of a (sub)plot can be changed with the `framestyle` @@ -736,7 +736,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 35 "Lines and markers with varying colors", """ You can use the `line_z` and `marker_z` properties to associate a color with @@ -762,7 +762,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 36 "Portfolio Composition maps", """ see: http://stackoverflow.com/a/37732384/5075246 @@ -788,7 +788,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 37 "Ribbons", """ Ribbons can be added to lines via the `ribbon` keyword; @@ -811,7 +811,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 38 "Histogram2D (complex values)", "", [ @@ -830,7 +830,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 39 "Unconnected lines using `missing` or `NaN`", """ Missing values and non-finite values, including `NaN`, are not plotted. @@ -854,7 +854,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 40 "Lens", "A lens lets you easily magnify a region of a plot. x and y coordinates refer to the to be magnified region and the via the `inset` keyword the subplot index and the bounding box (in relative coordinates) of the inset plot with the magnified plot can be specified. Additional attributes count for the inset plot.", [ @@ -876,7 +876,7 @@ const _examples = PlotExample[ end, ], ), - PlotExample( + PlotExample( # 41 "Array Types", "Plots supports different `Array` types that follow the `AbstractArray` interface, like `StaticArrays` and `OffsetArrays.`", [ @@ -891,7 +891,7 @@ const _examples = PlotExample[ end, ], ), - PlotExample( + PlotExample( # 42 "Setting defaults and font arguments", "", [ @@ -921,7 +921,7 @@ const _examples = PlotExample[ end, ], ), - PlotExample( + PlotExample( # 43 "Heatmap with DateTime axis", "", [ @@ -936,7 +936,7 @@ const _examples = PlotExample[ end, ], ), - PlotExample( + PlotExample( # 44 "Linked axes", "", [ @@ -948,7 +948,7 @@ const _examples = PlotExample[ end, ], ), - PlotExample( + PlotExample( # 45 "Error bars and array type recipes", "", [ @@ -985,7 +985,7 @@ const _examples = PlotExample[ end, ], ), - PlotExample( + PlotExample( # 46 "Tuples and `Point`s as data", "", [quote @@ -996,7 +996,7 @@ const _examples = PlotExample[ scatter!(Point2.(eachcol(rand(d,1000))), alpha=0.25) end] ), - PlotExample( + PlotExample( # 47 "Mesh3d", """ Allows to plot arbitrary 3d meshes. If only x,y,z are given the mesh is generated automatically. @@ -1025,7 +1025,7 @@ const _examples = PlotExample[ ), ], ), - PlotExample( + PlotExample( # 48 "Vectors of markershapes and segments", "", [quote