<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question R plots in Zeppelin look fuzzy in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/R-plots-in-Zeppelin-look-fuzzy/m-p/233271#M67246</link>
    <description>&lt;P&gt;
 R's ggplot2 is a popular and versatile data visualization package.&lt;/P&gt;&lt;P&gt;
 The facet plots are a particularly useful method to identify characteristics and anomalies. We can break a scatter plot into facets simply by adding &lt;EM&gt;+ facet_wrap(~myVar)&lt;/EM&gt; to an existing plot. Here's an example plot (screenshot from RStudio):&lt;/P&gt;&lt;P&gt;
 &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="38391-ggplot-rstudio.png" style="width: 751px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14760i1B69CB142332FE1D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="38391-ggplot-rstudio.png" alt="38391-ggplot-rstudio.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;
 Zeppelin supports the R interpreter. Providing R is installed, we can run R commands inside a notebook cell:&lt;/P&gt;&lt;P&gt;
 &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="38392-ggplot-zeppelin.png" style="width: 821px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14761iB3C380E0349AC1FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="38392-ggplot-zeppelin.png" alt="38392-ggplot-zeppelin.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;
 In this case, we ran a Hive query and created a facet plot.&lt;/P&gt;&lt;P&gt;
 The question: it looks to me like Zeppelin has created a raster image that's been upscaled and therefore looks fuzzy. In RStudio, the plots look a lot crisper.&lt;/P&gt;&lt;P&gt;I notice that there's an open JIRA for this: &lt;A href="https://issues.apache.org/jira/browse/ZEPPELIN-1445" rel="nofollow noopener noreferrer" target="_blank"&gt;https://issues.apache.org/jira/browse/ZEPPELIN-1445&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Is there a way to make ggplots look crisp in Zeppelin? Is there a way to render plots as PDF's, i.e. a vector format that doesn't get blurry when scaled, and then display those PDF's inside of the Zeppelin notebook?&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 00:16:49 GMT</pubDate>
    <dc:creator>awoolford</dc:creator>
    <dc:date>2019-08-18T00:16:49Z</dc:date>
    <item>
      <title>R plots in Zeppelin look fuzzy</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/R-plots-in-Zeppelin-look-fuzzy/m-p/233271#M67246</link>
      <description>&lt;P&gt;
 R's ggplot2 is a popular and versatile data visualization package.&lt;/P&gt;&lt;P&gt;
 The facet plots are a particularly useful method to identify characteristics and anomalies. We can break a scatter plot into facets simply by adding &lt;EM&gt;+ facet_wrap(~myVar)&lt;/EM&gt; to an existing plot. Here's an example plot (screenshot from RStudio):&lt;/P&gt;&lt;P&gt;
 &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="38391-ggplot-rstudio.png" style="width: 751px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14760i1B69CB142332FE1D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="38391-ggplot-rstudio.png" alt="38391-ggplot-rstudio.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;
 Zeppelin supports the R interpreter. Providing R is installed, we can run R commands inside a notebook cell:&lt;/P&gt;&lt;P&gt;
 &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="38392-ggplot-zeppelin.png" style="width: 821px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14761iB3C380E0349AC1FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="38392-ggplot-zeppelin.png" alt="38392-ggplot-zeppelin.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;
 In this case, we ran a Hive query and created a facet plot.&lt;/P&gt;&lt;P&gt;
 The question: it looks to me like Zeppelin has created a raster image that's been upscaled and therefore looks fuzzy. In RStudio, the plots look a lot crisper.&lt;/P&gt;&lt;P&gt;I notice that there's an open JIRA for this: &lt;A href="https://issues.apache.org/jira/browse/ZEPPELIN-1445" rel="nofollow noopener noreferrer" target="_blank"&gt;https://issues.apache.org/jira/browse/ZEPPELIN-1445&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Is there a way to make ggplots look crisp in Zeppelin? Is there a way to render plots as PDF's, i.e. a vector format that doesn't get blurry when scaled, and then display those PDF's inside of the Zeppelin notebook?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 00:16:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/R-plots-in-Zeppelin-look-fuzzy/m-p/233271#M67246</guid>
      <dc:creator>awoolford</dc:creator>
      <dc:date>2019-08-18T00:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: R plots in Zeppelin look fuzzy</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/R-plots-in-Zeppelin-look-fuzzy/m-p/233272#M67247</link>
      <description>&lt;P&gt;Zeppelin stores a lot of settings in interpreter.json&lt;/P&gt;&lt;P&gt;The default dpi (dots per inch) for R plot is 72, hence the blurry plots. This value can be increased by adding a dpi property to Zeppelin's R render options. Search for the "zeppelin.R.render.options" key and add "dpi=300":&lt;/P&gt;&lt;PRE&gt;"zeppelin.R.render.options": "out.format = 'html', comment = NA, echo = FALSE, results = 'asis', message = F, warning = F, dpi=300",&lt;/PRE&gt;&lt;P&gt;You can see an example of the output below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="38398-zeppelin-facet-300dpi.png" style="width: 1816px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14759iC352FF92BB39120C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="38398-zeppelin-facet-300dpi.png" alt="38398-zeppelin-facet-300dpi.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 00:16:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/R-plots-in-Zeppelin-look-fuzzy/m-p/233272#M67247</guid>
      <dc:creator>awoolford</dc:creator>
      <dc:date>2019-08-18T00:16:35Z</dc:date>
    </item>
  </channel>
</rss>

