-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLeanPlot.lean
More file actions
86 lines (69 loc) · 2.37 KB
/
LeanPlot.lean
File metadata and controls
86 lines (69 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
-- Plot specification system (import first to allow overrides)
import LeanPlot.Specification
import LeanPlot.Plot
-- Core API (what users should import)
import LeanPlot.Graphic -- First-class algebraic graphics (overrides some Specification names)
import LeanPlot.Interactive -- Two-way slider widgets
import LeanPlot.API
import LeanPlot.DSL
import LeanPlot.ToFloat
import LeanPlot.Algebra
-- Components layer (Tier-1)
import LeanPlot.Components
import LeanPlot.Palette
import LeanPlot.Scale
import LeanPlot.Constants
-- Advanced features
import LeanPlot.GrammarOfGraphics
import LeanPlot.PlotComposition
import LeanPlot.Transform
import LeanPlot.Faceting
-- Utilities
import LeanPlot.Debug
import LeanPlot.Metaprogramming
-- Rendering / Export
import LeanPlot.Render.Bitmap
import LeanPlot.Render.Rasterize
import LeanPlot.Render.PNG.CRC32
import LeanPlot.Render.PNG.Adler32
import LeanPlot.Render.PNG.Encode
import LeanPlot.Render.Export
-- Internal (re-exported for compatibility)
import LeanPlot.Series
import LeanPlot.Core
import LeanPlot.Axis
-- import LeanPlot.Axes -- Duplicate of LeanPlot.Axis, causes conflict
import LeanPlot.Legend
import LeanPlot.AutoDomain
import LeanPlot.Recharts
import LeanPlot.JsonExt
import LeanPlot.Utils
import LeanPlot.AssertKeys
import LeanPlot.WarningBanner
import LeanPlot.LegacyLayer
/-!
# LeanPlot
Interactive plotting for Lean 4.
## Main API
Import `LeanPlot.Graphic` for first-class algebraic graphics:
- `plot f` - Create a function plot
- `scatter pts` - Scatter plot from points
- `bar pts` - Bar chart from points
- Algebraic operators: `+` (overlay), `|||` (horizontal facet), `/` (vertical facet)
- Fluent combinators: `.domain`, `.samples`, `.color`, `.title`, etc.
Import `LeanPlot.API` and `LeanPlot.DSL` for legacy plotting functions:
- `plotMany` - Multiple function comparison
- `#plot` - Convenient syntax for quick visualization
## PNG/SVG Export
Import `LeanPlot.Render.Export` for file export:
- `g.savePNG "path.png"` - Save graphic to PNG
- `g.saveSVG "path.svg"` - Save graphic to SVG
## Advanced Features
- `LeanPlot.GrammarOfGraphics` - Grammar of Graphics DSL
- `LeanPlot.Interactive` - Two-way slider widgets
- `LeanPlot.PlotComposition` - Subplot grids and composition
- `LeanPlot.Transform` - Data transformations (log, sqrt, etc.)
- `LeanPlot.Faceting` - Small multiples layouts
## Demos
See `LeanPlot.Demos.*` for example usage.
-/