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
* @param unit Unit of the output image. One of: `"in"`, `"cm"`, `"mm"`, `"px"`.
40
-
* Only applicable when exporting to SVG, PNG, JPG, or TIFF. For HTML, the unit is always `"px"` (pixels).
41
-
* Default:
42
-
* "px" (pixels) for SVG,
43
-
* "in" (inches) for the raster formats (PNG, JPG, and TIFF).
44
-
* @param dpi Resolution in dots per inch.
45
-
* Only applicable when exporting to the raster formats: PNG, JPG, or TIFF.
46
-
* The default value depends on the [unit]:
47
-
* - for `"px"` it is `96` (output image will have the same pixel size as [w] and [h] values)
48
-
* - for physical units (`"in"`, `"cm"`, `"mm"`) it is `300`.
49
-
* @param path Path to a directory to save image files in.
50
-
* Default: `${user.dir}/lets-plot-images`
51
-
*
52
-
* @return Absolute pathname of the created file.
53
-
*
54
-
* ### Notes
29
+
* ## Notes
55
30
*
56
31
* The output format is inferred from the file extension.
57
32
*
58
33
* **For PNG and PDF:**
59
34
*
60
-
* - If [w], [h], [unit], and [dpi] are all specified:
35
+
* - If `w`, `h`, `unit`, and `dpi` are all specified:
61
36
*
62
-
* - The plot's pixel size (default or set via [ggsize()](https://lets-plot.org/kotlin/api-reference/-lets--plot--kotlin/org.jetbrains.letsPlot/ggsize.html) is ignored.
37
+
* - The plot's pixel size (default or set via [ggsize()][org.jetbrains.letsPlot.ggsize]) is ignored.
63
38
* - The output size is computed from the given dimensions and DPI.
64
-
* - The plot is resized to fit the specified [w] x [h] area, which may affect the layout.
39
+
* - The plot is resized to fit the specified `w` x `h` area, which may affect the layout.
65
40
*
66
-
* - If only [dpi] is specified:
67
-
* - The plot's pixel size (default or set via [ggsize()](https://lets-plot.org/kotlin/api-reference/-lets--plot--kotlin/org.jetbrains.letsPlot/ggsize.html)) is converted to inches assuming the standard display PPI of 96 PPI.
68
-
* - The output size is computed from this size and [dpi].
41
+
* - If only `dpi` is specified:
42
+
* - The plot's pixel size (default or set via [ggsize()][org.jetbrains.letsPlot.ggsize]) is converted to inches assuming the standard display PPI of 96 PPI.
43
+
* - The output size is computed from this size and `dpi`.
69
44
* - The plot maintains its aspect ratio, preserving layout, tick labels, and other visual elements.
70
45
* - Useful for printing - the plot will appear nearly the same size as on screen.
71
46
*
72
-
* - If [w] and [h] are not specified:
73
-
* - The [scale] parameter is used to determine the output size.
47
+
* - If `w` and `h` are not specified:
48
+
* - The `scale` parameter is used to determine the output size.
74
49
*
75
50
* - The plot maintains its aspect ratio, preserving layout, tick labels, and other visual elements.
76
51
* - Useful for generating high-resolution images suitable for publication.
77
52
*
78
53
* **For SVG:**
79
-
* - If [w], [h], and [unit] are specified:
80
-
* - The plot's pixel size (default or set via [ggsize()](https://lets-plot.org/kotlin/api-reference/-lets--plot--kotlin/org.jetbrains.letsPlot/ggsize.html)) is ignored.
54
+
*
55
+
* - If `w`, `h`, and `unit` are specified:
56
+
* - The plot's pixel size (default or set via [ggsize()][org.jetbrains.letsPlot.ggsize]) is ignored.
81
57
* - The output size is set from the given values.
82
58
*
83
59
* **For HTML:**
84
-
* - If [w] and [h] are specified:
85
-
* - The plot's pixel size (default or set via [ggsize()](https://lets-plot.org/kotlin/api-reference/-lets--plot--kotlin/org.jetbrains.letsPlot/ggsize.html)) is ignored.
86
-
* - The output size is determined directly from the specified [w] and [h], which are treated as pixel values.
60
+
*
61
+
* - If `w` and `h` are specified:
62
+
* - The plot's pixel size (default or set via [ggsize()][org.jetbrains.letsPlot.ggsize]) is ignored.
63
+
* - The output size is determined directly from the specified `w` and `h`, which are treated as pixel values.
0 commit comments