Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
spatialthoughts committed Aug 10, 2023
1 parent 2bd602d commit cb56e4b
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/gee-charts.html
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ <h4 class="author">Ujaval Gandhi</h4>
<li><a href="#exercise-10" id="toc-exercise-10">Exercise</a></li>
</ul></li>
</ul></li>
<li><a href="#exporting-charts" id="toc-exporting-charts">Exporting
Charts</a></li>
<li><a href="#supplement" id="toc-supplement">Supplement</a>
<ul>
<li><a href="#dual-y-axis-chart" id="toc-dual-y-axis-chart">Dual Y-Axis
Expand Down Expand Up @@ -2102,6 +2104,36 @@ <h3>Exercise</h3>
</div>
</div>
</div>
<div id="exporting-charts" class="section level1">
<h1>Exporting Charts</h1>
<p>The charts produced by Google Earth Engine can be exported in SVG
(Scalable Vector Graphics) format. This is a vector format that
preserves the full-fidelity of the chart and can be converted to an
image format at any resolution. Here are the steps to create a
high-resolution graphic from your chart.</p>
<p>1 Once the chart is rendered in the Code Editor, click the arrow next
to the chart to view it in a new tab.</p>
<p><img src="images/gee_charts/export1.png" width="75%" style="display: block; margin: auto;" /></p>
<ol start="2" style="list-style-type: decimal">
<li>Click the <em>Download SVG</em> button.</li>
</ol>
<p><img src="images/gee_charts/export2.png" width="75%" style="display: block; margin: auto;" /></p>
<ol start="3" style="list-style-type: decimal">
<li>You can open the resulting SVG in a graphics software and export it
at a chosen resolution from there. You can also use free web-based
tools. Visit <a href="https://www.svgviewer.dev/"
class="uri">https://www.svgviewer.dev/</a> and upload your SVG
file.</li>
</ol>
<p><img src="images/gee_charts/export3.png" width="75%" style="display: block; margin: auto;" /></p>
<ol start="4" style="list-style-type: decimal">
<li>Switch to the <em>.png</em> tab. Choose the scale factor. The higher
the number the higher the resolution of the output file. Click
<em>Download .png</em> button.</li>
</ol>
<p><img src="images/gee_charts/export4.png" width="75%" style="display: block; margin: auto;" /></p>
<p>You now have a hi-resolution PNG image of your chart.</p>
</div>
<div id="supplement" class="section level1">
<h1>Supplement</h1>
<div id="dual-y-axis-chart" class="section level2">
Expand Down
Binary file added docs/images/gee_charts/export1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/gee_charts/export2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/gee_charts/export3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/gee_charts/export4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions gee-charts.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,37 @@ knitr::include_graphics('images/gee_charts/box_plot.png')
knitr::include_graphics('images/gee_charts/box_plot_exercise.png')
```

# Exporting Charts

The charts produced by Google Earth Engine can be exported in SVG (Scalable Vector Graphics) format. This is a vector format that preserves the full-fidelity of the chart and can be converted to an image format at any resolution. Here are the steps to create a high-resolution graphic from your chart.

1 Once the chart is rendered in the Code Editor, click the arrow next to the chart to view it in a new tab.

```{r echo=FALSE, fig.align='center', out.width='75%'}
knitr::include_graphics('images/gee_charts/export1.png')
```

2. Click the *Download SVG* button.

```{r echo=FALSE, fig.align='center', out.width='75%'}
knitr::include_graphics('images/gee_charts/export2.png')
```

3. You can open the resulting SVG in a graphics software and export it at a chosen resolution from there. You can also use free web-based tools. Visit https://www.svgviewer.dev/ and upload your SVG file.


```{r echo=FALSE, fig.align='center', out.width='75%'}
knitr::include_graphics('images/gee_charts/export3.png')
```

4. Switch to the *.png* tab. Choose the scale factor. The higher the number the higher the resolution of the output file. Click *Download .png* button.


```{r echo=FALSE, fig.align='center', out.width='75%'}
knitr::include_graphics('images/gee_charts/export4.png')
```

You now have a hi-resolution PNG image of your chart.

# Supplement

Expand Down
Binary file added images/gee_charts/export1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/gee_charts/export2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/gee_charts/export3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/gee_charts/export4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cb56e4b

Please sign in to comment.