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
Playing around with the mtcars dataset, un-faceted plots are displayed correctly in jupyter via the kotlin-jupyter kernel:
When trying to facet by cylinder or any integer column, the image is truncated to varying degrees based on my window size. Regardless, part of the data, axes or guide is always missing:
Notebook code for reference:
%use lets-plot, kotlin-statistics
@file:Repository("https://jitpack.io")
@file:DependsOn("de.mpicbg.scicomp:krangl:0.11")
import krangl.*
val df = DataFrame.readCSV("data/mtcars.csv")
fun DataCol.toList() = when (this) {
is DoubleCol -> asDoubles()
is IntCol -> asInts()
is LongCol -> asLongs()
is StringCol -> asStrings()
else -> null
}?.toList()
fun DataFrame.toMap() = this.cols
.map { it.name to it.toList() }
.filter { it.second != null }
.toMap()
df["cyl"].asInts().toSet()
val plot = lets_plot(df.toMap()){x = "disp"; y = "hp" }
(
lets_plot(df.toMap()){x = "disp"; y = "hp" }
+ geom_point() { size="mpg"; color = "cyl"}
+ scale_color_continuous("red", "blue", guide = guide_legend(ncol=1))
+ facet_grid("cyl")
)
(
ggplot(df.toMap()){x = "disp"}
+ geom_histogram()
+ facet_grid("gear", "cyl")
)
The text was updated successfully, but these errors were encountered:
In v1.3.0 the output should not exceed width of the container element (unless the plot size is overridden by the ggsize() function).
Please checkout v1.3.0.
Playing around with the mtcars dataset, un-faceted plots are displayed correctly in jupyter via the kotlin-jupyter kernel:
When trying to facet by cylinder or any integer column, the image is truncated to varying degrees based on my window size. Regardless, part of the data, axes or guide is always missing:
Notebook code for reference:
The text was updated successfully, but these errors were encountered: