The Insights
module is used to store plots and images generated in Workbench, our internal RStudio environment. This page is for users with access to Workbench and our collaborators working closely with the Enable Scientific Team.
If there are no uploaded plots for a study, the Insights page is empty:
All plots are uploaded to the Insights Module from Workbench.
Below is an example code for how images are uploaded in .svg
format:
STUDY_ID <- 000
myPlot <- ggplot(my_df)
upload_image(myPlot,
file.name = "my_plot.svg",
card.title = "Heatmap",
study_id = STUDY_ID,
plot.description = "A heatmap plot")
Below is an example code for how images are uploaded in .png
format:
STUDY_ID <- 000
myPlot <- ggplot(my_df)
upload_image(myPlot,
file.name = "my_plot.png",
card.title = "Heatmap",
study_id = STUDY_ID,
plot.description = "A heatmap plot",
units = "in",
height = 7,
width = 7,
res = 300)
More detail on how to use upload_image
is available in the emconnect
documentation and in the SpatialMap
vignette on pushing plots to the portal.
After the above code is run, the plot first appears under the Ungrouped Plots
tab, under the plot card that you assigned in your Workbench code.
Note: If you have the Insights page open when you upload the plot from Workbench, you will need to refresh the page for the plot to appear.
If you click on the …
icon on the top right corner, you will see some options for the card. Click Download Image
to download the plot to your local computer. Click Move to Story
to assign your plot card to a Story in the Stories
tab (more details below). Finally, click Delete Card
to delete the entire card from the Insights
Page.
Note: This action is not reversible, and you will also remove all plots associated with this card.
You may decide that some of the plots you have generated can be grouped into a single card, and this can be useful to prevent the Insights page from becoming too cluttered. An example of this would be when we upload UMAP plots of biomarker expression for each biomarker in the panel.