# Integrating R (ggplot2) into a KNIME workflow

**URL:** <https://forum.knime.com/t/integrating-r-ggplot2-into-a-knime-workflow/18813>\
**Category:** KNIME Analytics Platform\
**Created:** [October 15, 2019, 2:18pm UTC](https://forum.knime.com/t/integrating-r-ggplot2-into-a-knime-workflow/18813 "2019-10-15T14:18:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [October 15, 2019, 2:56pm UTC](https://forum.knime.com/t/integrating-r-ggplot2-into-a-knime-workflow/18813/2 "2019-10-15T14:56:42Z")

</div>

For the general access to a database you could use the KNIME DA Nodes:  
[https://docs.knime.com/2019-06/db\_extension\_guide/index.html](https://docs.knime.com/2019-06/db_extension_guide/index.html)

Then I have a few more examples of graphics using R and Python you might find useful.

R - multiple graphics

> [@Multiple plots / graphs from a single R script](https://forum.knime.com/t/multiple-plots-graphs-from-a-single-r-script/12746/2):
>
> You could determine a local path and then tell R to save various graphics in a row. I attached an example workflow that does that. You might use that as a starter. The R View shows one plot but saves more than one. I tried that with just a R scrip node but it gave me an error message. library(ggplot2) [https://www.andrewheiss.com/blog/2016/12/08/save-base-graphics-as-pseudo-objects-in-r/](https://www.andrewheiss.com/blog/2016/12/08/save-base-graphics-as-pseudo-objects-in-r/) var\_name\_pdf\_file \<- paste0(knime.flow.in[[“var\_path\_graphic”]], “rplot.pdf”) var\_name\_png\_file \<- paste0…

R - Venn Gram - Export graphics to PNG

> [@Venn / Euler diagrams](https://forum.knime.com/t/venn-euler-diagrams/13670/6):
>
> I toyed around with Stephan Kolassa’s “Data Scientis Venn Diagram” and R. And I could bring it to PNG, although I do not claim to have fully grasped to construct a VennGram from scratch. Maybe it can serve as an inspiration … The list of steps to compile Rserve on MacOS is in the [blog entry](https://forum.knime.com/t/install-r-alongside-knime-on-windows-and-macos/13287). [kn\_example\_venn\_gram.knwf](https://forum-cdn.knime.com/uploads/default/original/2X/2/26c6e8607e5eb6d58abfd067b9c0c68638fe5939.knwf) (554.3 KB)

R - Heatmaps with Dendrograms

> **[Create Heatmaps in KNIME and use R to add Dendrograms – mlauber71](https://hub.knime.com/mlauber71/spaces/Public/kn_example_r_heatmap_cars~F7jk-Ao9rhyfW8Ma/current-state)**
>
> It is possible to create heatmaps with dendrograms with the help to R. You would have to check the code if the distance and cluster settings fit your needs. Yo…

Python - some graphics from the Iris data set

> **[Examples of using Python to generate graphics (using the isris dataset) –...](https://hub.knime.com/mlauber71/spaces/Public/kn_example_python_iris_graphics~9KqDxWg0VUftGEZd/current-state)**
>
> Examples of using Python to generate graphics (using the isris dataset)

---

_[View the full topic](https://forum.knime.com/t/integrating-r-ggplot2-into-a-knime-workflow/18813)._
