Skip to content

Commit c5a1311

Browse files
Add a KDoc note on unit in ggsave()
1 parent 4da6f7c commit c5a1311

File tree

1 file changed

+4
-2
lines changed
  • plot-api/src/jvmMain/kotlin/org/jetbrains/letsPlot/export

1 file changed

+4
-2
lines changed

plot-api/src/jvmMain/kotlin/org/jetbrains/letsPlot/export/ggsave.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ private const val DEF_EXPORT_DIR = "lets-plot-images"
3737
* @param w Width of the output image in units.
3838
* @param h Height of the output image in units.
3939
* @param unit Unit of the output image. One of: `"in"`, `"cm"`, `"mm"`, `"px"`.
40-
* Only applicable when exporting to SVG, PNG, JPG, or TIFF.
41-
* Default: "in" (inches).
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).
4244
* @param dpi Resolution in dots per inch.
4345
* Only applicable when exporting to the raster formats: PNG, JPG, or TIFF.
4446
* The default value depends on the [unit]:

0 commit comments

Comments
 (0)