Skip to content

Commit ca403f4

Browse files
committed
added ggExtra
1 parent e80caa7 commit ca403f4

File tree

15 files changed

+304
-2
lines changed

15 files changed

+304
-2
lines changed

geomnet.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ <h5 class="list-group-item-heading">ggpmisc</h5>
130130
<h5 class="list-group-item-heading">geomnet</h5>
131131
<p class="list-group-item-text">Network visualizations in ggplot2</p>
132132
</a>
133+
<a href="ggExtra.html" class="list-group-item">
134+
<h5 class="list-group-item-heading">ggExtra</h5>
135+
<p class="list-group-item-text">Marginal density plots or histograms</p>
136+
</a>
133137

134138
</div> <!-- list-group -->
135139

-3.17 KB
Loading

ggExtra.Rmd

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: "ggplot2 extensions: ggExtra"
3+
---
4+
5+
### ggExtra
6+
[https://github.com/daattali/ggExtra](https://github.com/daattali/ggExtra)
7+
8+
[Live demo](http://daattali.com/shiny/ggExtra-ggMarginal-demo/)
9+
10+
ggExtra lets you add marginal density plots or histograms to ggplot2 scatterplots
11+
12+
```{r message=FALSE,warning=FALSE}
13+
library("ggplot2")
14+
library("ggExtra")
15+
16+
# Basic usage
17+
set.seed(30)
18+
df <- data.frame(x = rnorm(500, 50, 10), y = runif(500, 0, 50))
19+
p <- ggplot(df, aes(x, y)) + geom_point()
20+
```
21+
22+
```{r message=FALSE,warning=FALSE}
23+
ggMarginal(p)
24+
ggMarginal(p, colour = "red")
25+
ggMarginal(p, type = "histogram")
26+
```

ggExtra.html

Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
<!DOCTYPE html>
2+
3+
<html xmlns="http://www.w3.org/1999/xhtml">
4+
5+
<head>
6+
7+
<meta charset="utf-8">
8+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9+
<meta name="generator" content="pandoc" />
10+
11+
12+
13+
<title>ggplot2 extensions: ggExtra</title>
14+
15+
<script src="libs/jquery-1.11.0/jquery.min.js"></script>
16+
<meta name="viewport" content="width=device-width, initial-scale=1" />
17+
<link href="libs/bootstrap-3.3.1/css/cosmo.min.css" rel="stylesheet" />
18+
<script src="libs/bootstrap-3.3.1/js/bootstrap.min.js"></script>
19+
<script src="libs/bootstrap-3.3.1/shim/html5shiv.min.js"></script>
20+
<script src="libs/bootstrap-3.3.1/shim/respond.min.js"></script>
21+
22+
<!-- Styles for this site -->
23+
<meta name="viewport" content="width=device-width, initial-scale=1">
24+
<link href="css/styles.css" rel="stylesheet">
25+
26+
27+
<!-- Polyfill JS -->
28+
<script src="js/polyfill.js"></script>
29+
30+
<style type="text/css">code{white-space: pre;}</style>
31+
<link rel="stylesheet"
32+
href="libs/highlight/textmate.css"
33+
type="text/css" />
34+
<script src="libs/highlight/highlight.js"></script>
35+
<style type="text/css">
36+
pre:not([class]) {
37+
background-color: white;
38+
}
39+
</style>
40+
<script type="text/javascript">
41+
if (window.hljs && document.readyState && document.readyState === "complete") {
42+
window.setTimeout(function() {
43+
hljs.initHighlighting();
44+
}, 0);
45+
}
46+
</script>
47+
48+
49+
50+
</head>
51+
52+
<body>
53+
54+
<style type = "text/css">
55+
.main-container {
56+
max-width: 940px;
57+
margin-left: auto;
58+
margin-right: auto;
59+
}
60+
code {
61+
color: inherit;
62+
background-color: rgba(0, 0, 0, 0.04);
63+
}
64+
img {
65+
max-width:100%;
66+
height: auto;
67+
}
68+
</style>
69+
<div class="container-fluid main-container">
70+
71+
<!--html_preserve-->
72+
73+
<div class="header">
74+
<nav class="navbar">
75+
<h3 class="navbar-left"><strong>ggplot2</strong> extensions</h3>
76+
<ul class="nav nav-pills navbar-right">
77+
<li role="presentation" id="nav-home"><a href="index.html">Home</a></li>
78+
<li role="presentation" id="nav-showcase"><a href="ggiraph.html">Extensions</a></li>
79+
<li role="presentation" id="nav-github"><a href="https://github.com/ggplot2-exts/ggplot2-exts.github.io">GitHub</a></li>
80+
</ul>
81+
</nav>
82+
</div>
83+
84+
<div class="showcase-header">
85+
86+
<div id = "showcase-intro">
87+
ggplot2 now has an official extension mechanism. This means that others can now easily create their own stats, geoms and positions, and provide them in other packages. This should allow the ggplot2 community to flourish, even as less development work happens in ggplot2 itself. This page showcases these extensions.
88+
</div>
89+
90+
<div class="container-fluid">
91+
<div class="row">
92+
93+
<div class="col-sm-4">
94+
<div class="list-group">
95+
<a href="ggiraph.html" class="list-group-item">
96+
<h5 class="list-group-item-heading">ggiraph</h5>
97+
<p class="list-group-item-text">Make ggplot interactive</p>
98+
</a>
99+
<a href="ggstance.html" class="list-group-item">
100+
<h5 class="list-group-item-heading">ggstance</h5>
101+
<p class="list-group-item-text">Horizontal versions of ggplot2 geoms</p>
102+
</a>
103+
104+
<a href="ggalt.html" class="list-group-item">
105+
<h5 class="list-group-item-heading">ggalt</h5>
106+
<p class="list-group-item-text">Extra coordinate systems, geoms & stats</p>
107+
</a>
108+
109+
<a href="ggforce.html" class="list-group-item">
110+
<h5 class="list-group-item-heading">ggforce</h5>
111+
<p class="list-group-item-text">Accelarating ggplot2</p>
112+
</a>
113+
114+
<a href="ggrepel.html" class="list-group-item">
115+
<h5 class="list-group-item-heading">ggrepel</h5>
116+
<p class="list-group-item-text">Repel overlapping text labels</p>
117+
</a>
118+
119+
<a href="ggraph.html" class="list-group-item">
120+
<h5 class="list-group-item-heading">ggraph</h5>
121+
<p class="list-group-item-text">Plot graph-like data structures</p>
122+
</a>
123+
124+
<a href="ggpmisc.html" class="list-group-item">
125+
<h5 class="list-group-item-heading">ggpmisc</h5>
126+
<p class="list-group-item-text">Miscellaneous extensions to ggplot2</p>
127+
</a>
128+
129+
<a href="geomnet.html" class="list-group-item">
130+
<h5 class="list-group-item-heading">geomnet</h5>
131+
<p class="list-group-item-text">Network visualizations in ggplot2</p>
132+
</a>
133+
<a href="ggExtra.html" class="list-group-item">
134+
<h5 class="list-group-item-heading">ggExtra</h5>
135+
<p class="list-group-item-text">Marginal density plots or histograms</p>
136+
</a>
137+
138+
</div> <!-- list-group -->
139+
140+
</div> <!-- col-sm-4 -->
141+
142+
<div id="ggextra" class="col-sm-8">
143+
<h3>ggExtra</h3>
144+
<p><a href="https://github.com/daattali/ggExtra" class="uri">https://github.com/daattali/ggExtra</a></p>
145+
<p><a href="http://daattali.com/shiny/ggExtra-ggMarginal-demo/">Live demo</a></p>
146+
<p>ggExtra lets you add marginal density plots or histograms to ggplot2 scatterplots</p>
147+
<pre class="r"><code>library(&quot;ggplot2&quot;)
148+
library(&quot;ggExtra&quot;)
149+
150+
# Basic usage
151+
set.seed(30)
152+
df &lt;- data.frame(x = rnorm(500, 50, 10), y = runif(500, 0, 50))
153+
p &lt;- ggplot(df, aes(x, y)) + geom_point()</code></pre>
154+
<pre class="r"><code>ggMarginal(p)</code></pre>
155+
<p><img src="ggExtra_files/figure-html/unnamed-chunk-2-1.png" title="" alt="" width="576" /></p>
156+
<pre class="r"><code>ggMarginal(p, colour = &quot;red&quot;)</code></pre>
157+
<p><img src="ggExtra_files/figure-html/unnamed-chunk-2-2.png" title="" alt="" width="576" /></p>
158+
<pre class="r"><code>ggMarginal(p, type = &quot;histogram&quot;)</code></pre>
159+
<p><img src="ggExtra_files/figure-html/unnamed-chunk-2-3.png" title="" alt="" width="576" /></p>
160+
</div> <!-- col-sm-8 -->
161+
162+
</div> <!-- row -->
163+
</div>
164+
165+
</div> <!-- showcase-header -->
166+
167+
168+
169+
<!--/html_preserve-->
170+
171+
172+
173+
174+
175+
176+
177+
</div> <!-- page-body -->
178+
179+
<footer>
180+
<div>&nbsp;</div>
181+
<div>&nbsp;</div>
182+
<div class="text-muted">
183+
Design inspired by <a href="http://www.htmlwidgets.org/index.html" target="_blank">Ramnath Vaidyanathan, Kenton Russell, and RStudio, Inc</a>.
184+
</div>
185+
<div class="text-muted">
186+
Maintained by <a href="http://www.danielemaasit.com" target="_blank">Daniel Emaasit</a>.
187+
</div>
188+
<div class="text-muted">
189+
Copyright &copy; 2016 The R Community.
190+
</div>
191+
</footer>
192+
193+
<script>
194+
// manage active state of headres and navigation based on current page
195+
196+
$(document).ready(function () {
197+
198+
// compute name of page
199+
href = window.location.pathname;
200+
href = href.substr(href.lastIndexOf('/') + 1);
201+
if (href == "")
202+
href = "index.html";
203+
204+
// main navigation and headers
205+
if (href.startsWith("index")) {
206+
$('#nav-home').addClass('active');
207+
$('.title').addClass('hidden');
208+
} else if (href.startsWith("showcase")) {
209+
$('#nav-showcase').addClass('active');
210+
$("#page-body").detach().appendTo('#showcase-body');
211+
$('.showcase-header').removeClass('hidden');
212+
$('.title').addClass('hidden');
213+
} else if (href.startsWith("develop")) {
214+
$('#nav-develop').addClass('active');
215+
}
216+
217+
// submenu navigation (used by showcase and develop)
218+
$('.list-group a[href="' + href + '"]').addClass('active');
219+
});
220+
221+
</script>
222+
223+
</div>
224+
225+
<script>
226+
227+
// add bootstrap table styles to pandoc tables
228+
$(document).ready(function () {
229+
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
230+
});
231+
232+
</script>
233+
234+
235+
</body>
236+
</html>
55.4 KB
Loading
Loading
51.9 KB
Loading

ggalt.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ <h5 class="list-group-item-heading">ggpmisc</h5>
130130
<h5 class="list-group-item-heading">geomnet</h5>
131131
<p class="list-group-item-text">Network visualizations in ggplot2</p>
132132
</a>
133+
<a href="ggExtra.html" class="list-group-item">
134+
<h5 class="list-group-item-heading">ggExtra</h5>
135+
<p class="list-group-item-text">Marginal density plots or histograms</p>
136+
</a>
133137

134138
</div> <!-- list-group -->
135139

ggforce.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ <h5 class="list-group-item-heading">ggpmisc</h5>
130130
<h5 class="list-group-item-heading">geomnet</h5>
131131
<p class="list-group-item-text">Network visualizations in ggplot2</p>
132132
</a>
133+
<a href="ggExtra.html" class="list-group-item">
134+
<h5 class="list-group-item-heading">ggExtra</h5>
135+
<p class="list-group-item-text">Marginal density plots or histograms</p>
136+
</a>
133137

134138
</div> <!-- list-group -->
135139

ggiraph.html

Lines changed: 8 additions & 2 deletions
Large diffs are not rendered by default.

ggpmisc.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ <h5 class="list-group-item-heading">ggpmisc</h5>
130130
<h5 class="list-group-item-heading">geomnet</h5>
131131
<p class="list-group-item-text">Network visualizations in ggplot2</p>
132132
</a>
133+
<a href="ggExtra.html" class="list-group-item">
134+
<h5 class="list-group-item-heading">ggExtra</h5>
135+
<p class="list-group-item-text">Marginal density plots or histograms</p>
136+
</a>
133137

134138
</div> <!-- list-group -->
135139

ggraph.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ <h5 class="list-group-item-heading">ggpmisc</h5>
130130
<h5 class="list-group-item-heading">geomnet</h5>
131131
<p class="list-group-item-text">Network visualizations in ggplot2</p>
132132
</a>
133+
<a href="ggExtra.html" class="list-group-item">
134+
<h5 class="list-group-item-heading">ggExtra</h5>
135+
<p class="list-group-item-text">Marginal density plots or histograms</p>
136+
</a>
133137

134138
</div> <!-- list-group -->
135139

ggrepel.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ <h5 class="list-group-item-heading">ggpmisc</h5>
130130
<h5 class="list-group-item-heading">geomnet</h5>
131131
<p class="list-group-item-text">Network visualizations in ggplot2</p>
132132
</a>
133+
<a href="ggExtra.html" class="list-group-item">
134+
<h5 class="list-group-item-heading">ggExtra</h5>
135+
<p class="list-group-item-text">Marginal density plots or histograms</p>
136+
</a>
133137

134138
</div> <!-- list-group -->
135139

@@ -177,6 +181,8 @@ <h3>ggrepel</h3>
177181

178182

179183

184+
185+
180186
</div> <!-- page-body -->
181187

182188
<footer>

ggstance.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ <h5 class="list-group-item-heading">ggpmisc</h5>
130130
<h5 class="list-group-item-heading">geomnet</h5>
131131
<p class="list-group-item-text">Network visualizations in ggplot2</p>
132132
</a>
133+
<a href="ggExtra.html" class="list-group-item">
134+
<h5 class="list-group-item-heading">ggExtra</h5>
135+
<p class="list-group-item-text">Marginal density plots or histograms</p>
136+
</a>
133137

134138
</div> <!-- list-group -->
135139

include/before_body.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ <h5 class="list-group-item-heading">ggpmisc</h5>
6060
<h5 class="list-group-item-heading">geomnet</h5>
6161
<p class="list-group-item-text">Network visualizations in ggplot2</p>
6262
</a>
63+
<a href="ggExtra.html" class="list-group-item">
64+
<h5 class="list-group-item-heading">ggExtra</h5>
65+
<p class="list-group-item-text">Marginal density plots or histograms</p>
66+
</a>
6367

6468
</div> <!-- list-group -->
6569

0 commit comments

Comments
 (0)