I am using vegas on IntelliJ to plot charts from Spark dataframes.
Since I am not using a notebook like Jupyter with Toree, my charts are displayed on separate windows, which is quite annoying when I have to plot 20 of them.
I would like to know if there is a way to make a subplot like in Matplotlib in python. Should I definitely use a notebook instead?
Here is my code in Scala, where histogram
is a dataframe with 2 columns : cube
and count
:
Vegas("Histogram").
withDataFrame(histogram).
encodeX("cube", Quantitative, scale = Scale(ScaleType.Log), title = "cube " + name).
encodeY("count", Quantitative).
mark(Bar).
show