<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/tips-for-ellipse-summary-plot/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://tomizonor.wordpress.com/2018/05/13/tips-for-ellipse-summary-plot/"> R – ЯтомизоnoR</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>I privately had some questions and reply here, because it may also help others including me.</p>
<p><img data-orig-file="https://tomizonor.files.wordpress.com/2018/05/plot_with_factors.png?w=456" data-orig-size="630,652" data-medium-file="https://tomizonor.files.wordpress.com/2018/05/plot_with_factors.png?w=456?w=290" data-attachment-id="451" data-image-meta="{" data-image-description="" src="https://tomizonor.files.wordpress.com/2018/05/plot_with_factors.png?w=456" data-permalink="https://tomizonor.wordpress.com/2018/05/13/tips-for-ellipse-summary-plot/plot_with_factors/" data-large-file="https://tomizonor.files.wordpress.com/2018/05/plot_with_factors.png?w=456?w=547" alt="plot_with_factors" data-image-title="plot_with_factors" sizes="(max-width: 547px) 100vw, 547px" data-comments-opened="1" class="wp-image-451" data-recalc-dims="1"></p>
<p><span></span></p>
<h2>1. How to specify size</h2>
<p>With plot axis parameters.</p>
<blockquote>
<p>> ellipseplot(iris[,c(‘Species’, ‘Sepal.Length’)], iris[,c(‘Species’, ‘Sepal.Width’)], xlim=c(4,8), ylim=c(2,5))</p>
</blockquote>
<h2>2. How to specify color</h2>
<p>With plot color parameter.</p>
<blockquote>
<p>> ellipseplot(iris[,c(‘Species’, ‘Sepal.Length’)], iris[,c(‘Species’, ‘Sepal.Width’)], col=c(‘cyan’, ‘orange’, ‘magenta’))</p>
</blockquote>
<h2>3. How to give names</h2>
<p>Using builtin <code>iris</code> data.</p>
<blockquote>
<p>> ellipseplot(iris[,c(‘Species’, ‘Sepal.Length’)], iris[,c(‘Species’, ‘Sepal.Width’)])</p>
</blockquote>
<h2>Digging deeper</h2>
<h3>about iris data</h3>
<blockquote>
<p>> str(iris)<br>
‘data.frame’: 150 obs. of 5 variables:<br>
$ Sepal.Length: num 5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 …<br>
$ Sepal.Width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 …<br>
$ Petal.Length: num 1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 …<br>
$ Petal.Width : num 0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 0.1 …<br>
$ Species : Factor w/ 3 levels “setosa”,”versicolor”,..: 1 1 1 1 1 1 1 1 1 1 …</p>
</blockquote>
<p>The column <code>Species</code> are used in both of x and y data. These are used to give the name of each catergory.</p>
<h3>example</h3>
<p>Using fivenum instead of default ninenum.</p>
<blockquote>
<p>> ellipseplot(iris[,c(‘Species’, ‘Sepal.Length’)], iris[,c(‘Species’, ‘Sepal.Width’)], col=c(‘cyan’, ‘orange’, ‘magenta’), SUMMARY=fivenum)</p>
</blockquote>
<p>Above shows the plot shown above.</p>
<p>Below may help you to know values on each axis.  Here, for the <code>fivenum</code>, each 3rd values is a (x, y) set of each category average.</p>
<blockquote>
<p>> ellipseplot(iris[,c(‘Species’, ‘Sepal.Length’)], iris[,c(‘Species’, ‘Sepal.Width’)], SUMMARY=fivenum, plot=FALSE)<br>
$setosa<br>
x y<br>
1 4.3 2.3<br>
2 4.8 3.2<br>
3 5.0 3.4<br>
4 5.2 3.7<br>
5 5.8 4.4</p>
<p>$versicolor<br>
x y<br>
1 4.9 2.0<br>
2 5.6 2.5<br>
3 5.9 2.8<br>
4 6.3 3.0<br>
5 7.0 3.4</p>
<p>$virginica<br>
x y<br>
1 4.9 2.2<br>
2 6.2 2.8<br>
3 6.5 3.0<br>
4 6.9 3.2<br>
5 7.9 3.8</p>
</blockquote>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://tomizonor.wordpress.com/2018/05/13/tips-for-ellipse-summary-plot/"> R – ЯтомизоnoR</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/TJILXMs4P8k" height="1"></a></div>