p <- gvisScatterChart(
data = cars[, c("speed", "dist")],
options = list(legend = "none",
lineWidth = 0,
pointSize = 1,
title = "Distância x Velocidade",
vAxis = "{title: 'Distância'}",
hAxis = "{title: 'Velocidade'}",
width = 700,
height = 500))
# Exibe uma página completa.
p
## <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
## "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
## <html xmlns="http://www.w3.org/1999/xhtml">
## <head>
## <title>ScatterChartID104452a3400</title>
## <meta http-equiv="content-type" content="text/html;charset=utf-8" />
## <style type="text/css">
## body {
## color: #444444;
## font-family: Arial,Helvetica,sans-serif;
## font-size: 75%;
## }
## a {
## color: #4D87C7;
## text-decoration: none;
## }
## </style>
## </head>
## <body>
## <!-- ScatterChart generated in R 3.4.4 by googleVis 0.6.2 package -->
## <!-- Tue May 8 20:25:07 2018 -->
##
##
## <!-- jsHeader -->
## <script type="text/javascript">
##
## // jsData
## function gvisDataScatterChartID104452a3400 () {
## var data = new google.visualization.DataTable();
## var datajson =
## [
## [
## 4,
## 2
## ],
## [
## 4,
## 10
## ],
## [
## 7,
## 4
## ],
## [
## 7,
## 22
## ],
## [
## 8,
## 16
## ],
## [
## 9,
## 10
## ],
## [
## 10,
## 18
## ],
## [
## 10,
## 26
## ],
## [
## 10,
## 34
## ],
## [
## 11,
## 17
## ],
## [
## 11,
## 28
## ],
## [
## 12,
## 14
## ],
## [
## 12,
## 20
## ],
## [
## 12,
## 24
## ],
## [
## 12,
## 28
## ],
## [
## 13,
## 26
## ],
## [
## 13,
## 34
## ],
## [
## 13,
## 34
## ],
## [
## 13,
## 46
## ],
## [
## 14,
## 26
## ],
## [
## 14,
## 36
## ],
## [
## 14,
## 60
## ],
## [
## 14,
## 80
## ],
## [
## 15,
## 20
## ],
## [
## 15,
## 26
## ],
## [
## 15,
## 54
## ],
## [
## 16,
## 32
## ],
## [
## 16,
## 40
## ],
## [
## 17,
## 32
## ],
## [
## 17,
## 40
## ],
## [
## 17,
## 50
## ],
## [
## 18,
## 42
## ],
## [
## 18,
## 56
## ],
## [
## 18,
## 76
## ],
## [
## 18,
## 84
## ],
## [
## 19,
## 36
## ],
## [
## 19,
## 46
## ],
## [
## 19,
## 68
## ],
## [
## 20,
## 32
## ],
## [
## 20,
## 48
## ],
## [
## 20,
## 52
## ],
## [
## 20,
## 56
## ],
## [
## 20,
## 64
## ],
## [
## 22,
## 66
## ],
## [
## 23,
## 54
## ],
## [
## 24,
## 70
## ],
## [
## 24,
## 92
## ],
## [
## 24,
## 93
## ],
## [
## 24,
## 120
## ],
## [
## 25,
## 85
## ]
## ];
## data.addColumn('number','speed');
## data.addColumn('number','dist');
## data.addRows(datajson);
## return(data);
## }
##
## // jsDrawChart
## function drawChartScatterChartID104452a3400() {
## var data = gvisDataScatterChartID104452a3400();
## var options = {};
## options["allowHtml"] = true;
## options["legend"] = "none";
## options["lineWidth"] = 0;
## options["pointSize"] = 1;
## options["title"] = "Distância x Velocidade";
## options["vAxis"] = {title: 'Distância'};
## options["hAxis"] = {title: 'Velocidade'};
## options["width"] = 700;
## options["height"] = 500;
##
##
## var chart = new google.visualization.ScatterChart(
## document.getElementById('ScatterChartID104452a3400')
## );
## chart.draw(data,options);
##
##
## }
##
##
## // jsDisplayChart
## (function() {
## var pkgs = window.__gvisPackages = window.__gvisPackages || [];
## var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
## var chartid = "corechart";
##
## // Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
## var i, newPackage = true;
## for (i = 0; newPackage && i < pkgs.length; i++) {
## if (pkgs[i] === chartid)
## newPackage = false;
## }
## if (newPackage)
## pkgs.push(chartid);
##
## // Add the drawChart function to the global list of callbacks
## callbacks.push(drawChartScatterChartID104452a3400);
## })();
## function displayChartScatterChartID104452a3400() {
## var pkgs = window.__gvisPackages = window.__gvisPackages || [];
## var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
## window.clearTimeout(window.__gvisLoad);
## // The timeout is set to 100 because otherwise the container div we are
## // targeting might not be part of the document yet
## window.__gvisLoad = setTimeout(function() {
## var pkgCount = pkgs.length;
## google.load("visualization", "1", { packages:pkgs, callback: function() {
## if (pkgCount != pkgs.length) {
## // Race condition where another setTimeout call snuck in after us; if
## // that call added a package, we must not shift its callback
## return;
## }
## while (callbacks.length > 0)
## callbacks.shift()();
## } });
## }, 100);
## }
##
## // jsFooter
## </script>
##
## <!-- jsChart -->
## <script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartScatterChartID104452a3400"></script>
##
## <!-- divChart -->
##
## <div id="ScatterChartID104452a3400"
## style="width: 700; height: 500;">
## </div>
## <div><span>Data: cars[, c("speed", "dist")] • Chart ID: <a href="Chart_ScatterChartID104452a3400.html">ScatterChartID104452a3400</a> • <a href="https://github.com/mages/googleVis">googleVis-0.6.2</a></span><br />
## <!-- htmlFooter -->
## <span>
## R version 3.4.4 (2018-03-15)
## • <a href="https://developers.google.com/terms/">Google Terms of Use</a> • <a href="https://google-developers.appspot.com/chart/interactive/docs/gallery/scatterchart">Documentation and Data Policy</a>
## </span></div>
## </body>
## </html>