<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/cone-plots-in-plotly-with-python/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://plotlyblog.tumblr.com/post/175740325442"> Plotly Blog</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Cone plots (also known as 3-D quiver plots) represent vector fields defined in some region of the 3-D space.</p>
<p>A vector field associates to each point of coordinates (x, y, z) a vector of components (u, v, w).</p>
<p>In this post, we’ll explore how <a rel="nofollow" href="https://plot.ly/feed/#/" target="_blank">Plotly’s</a> cone plots can be used to visualize atmospheric wind <img alt="💨" src="https://s.w.org/images/core/emoji/2.4/72x72/1f4a8.png" class="wp-smiley">, magnetic fields, a trajectory of the Rössler System, and tangent vector fields to a surface.<br>
</p>
<h2>So what’s a 3-D vector?</h2>
<p>∙ A vector is a geometric object that has magnitude and direction.</p>
<p>∙ A 3-D vector is useful in any physical space where both magnitude and direction matter.</p>
<p>∙ In 3-D space, vectors are identified with triples of scalar components. In the case of the example image below: <i>a = (ax, ay, az)</i></p>
<figure data-orig-width="450" data-orig-src="https://i.imgur.com/RaploxH.png" data-orig-height="1024"><img data-orig-width="450" data-orig-src="https://i.imgur.com/RaploxH.png" src="https://i1.wp.com/78.media.tumblr.com/7e97f1f790f2b75dc32fb3e77032d149/tumblr_inline_pbnbdq5Lst1srua81_540.png?resize=450%2C1024&ssl=1" data-recalc-dims="1" data-orig-height="1024"></figure>
<p>The direction of the vector field at a point is illustrated by a geometric cone, colored according to the vector norm (magnitude) at that point.</p>
<p>Cone plots can be used in a variety of abstract ways: to model a vortex (such as a tornado), illustrate an explicitly defined vector field, chart a hyperboloid, plot a system of non-linear ordinary differential equations, and show winds at various atmospheric levels.</p>
<p>For extra insights, check out our <a rel="nofollow" href="https://plot.ly/python/3d-cone/" target="_blank">tutorial</a> about making 3-D cone plots in Python with Plotly.<br>
</p>
<h2>Cone Plot Showing Atmospheric Wind</h2>
<p>This plot uses an explicitly defined vector field. A vector field refers to an assignment of a vector to each point in a subset of space.</p>
<p>In this plot, we visualize a collection of arrows that simply model the wind speed and direction at various levels of the atmosphere.</p>
<p>3-D weather plots can be useful to research scientists to gain a better understanding of the atmospheric profile, such as during the prediction of severe weather events like tornadoes and hurricanes.</p>
<figure data-orig-width="450" data-orig-src="https://i.imgur.com/7We9Ado.gif" data-orig-height="1296"><img data-orig-width="450" data-orig-src="https://i.imgur.com/7We9Ado.gif" src="https://i0.wp.com/78.media.tumblr.com/743313d366717b67138b47159cd28a15/tumblr_inline_pbnbdqIQPy1srua81_540.gif?resize=450%2C1296&ssl=1" data-recalc-dims="1" data-orig-height="1296"></figure>
<p><a rel="nofollow" href="https://plot.ly/~Dreamshot/9260/this-example-looks-at-hypothetical-wind/#/" target="_blank">Python code</a> | <a rel="nofollow" href="https://plot.ly/~Dreamshot/9258/#/" target="_blank">Link to plot</a></p>
<p>Speaking of tornado-like rotations, here is an example of a cone plot of a vortex. The size of the cones are driven by wind speed.</p>
<figure data-orig-width="450" data-orig-src="https://i.imgur.com/NoTTeYR.gif" data-orig-height="750"><img data-orig-width="450" data-orig-src="https://i.imgur.com/NoTTeYR.gif" src="https://i1.wp.com/78.media.tumblr.com/2262e0b98cfc1d4ee723c07a3f7b49d4/tumblr_inline_pbnbdroU4C1srua81_540.gif?resize=450%2C750&ssl=1" data-recalc-dims="1" data-orig-height="750"></figure>
<p><a rel="nofollow" href="https://plot.ly/~Dreamshot/9270/this-example-looks-at-a-vortex-represen/#/" target="_blank">Python code</a> | <a rel="nofollow" href="https://raw.githubusercontent.com/plotly/datasets/master/vortex.csv" target="_blank">Data</a> | <a rel="nofollow" href="https://plot.ly/~Dreamshot/9262/#/" target="_blank">Link to plot</a></p>
<h2>Cone Plot of a Magnetic Field</h2>
<p>The Biot-Savart Law is an equation that describes the magnetic field created by a current-carrying wire.</p>
<p>It was named after Jean-Baptiste Biot and Felix Savart in 1820 when the pair derived the mathematical expression for magnetic flux density.</p>
<p>In this example, we leverage the law to create a hypothetical magnetic field created by an electric current moving through three circular loops.</p>
<figure data-orig-width="450" data-orig-src="https://i.imgur.com/oH0Z96h.gif" data-orig-height="800"><img data-orig-width="450" data-orig-src="https://i.imgur.com/oH0Z96h.gif" src="https://i1.wp.com/78.media.tumblr.com/e03c7cffbb8d9c36dfe41c227e9b1dfe/tumblr_inline_pbnbds7kqa1srua81_540.gif?resize=450%2C800&ssl=1" data-recalc-dims="1" data-orig-height="800"></figure>
<p><a rel="nofollow" href="https://plot.ly/~empet/14904/magnetic-field-created-by-electric-curr/#/" target="_blank">Python code</a> | <a rel="nofollow" href="https://plot.ly/~empet/14888/magnetic-field-created-by-electric-current-through-three-circular-loops/#/" target="_blank">Link to plot</a></p>
<h2>Cone Plot Showing a Trajectory of the Rössler System</h2>
<p>The Rössler system is a system of three ordinary differential equations, whose dynamics exhibits an attractor, <a rel="nofollow" href="http://mathworld.wolfram.com/Attractor.html" target="_blank">or a set of states, invariant under the dynamics, towards which neighboring states in a given basin of attraction asymptotically approach in the course of dynamic evolution</a>.</p>
<p>Originally studied by Otto Rössler, these differential equations “<a rel="nofollow" href="https://en.wikipedia.org/wiki/R%C3%B6ssler_attractor" target="_blank">define a continuous-time dynamical system that exhibits chaotic dynamics associated with the fractal properties of the attractor</a>.”</p>
<p>The equations have been found to be useful in modeling equilibrium in chemical reactions.</p>
<figure data-orig-width="450" data-orig-src="https://i.imgur.com/f55JSkC.gif" data-orig-height="750"><img data-orig-width="450" data-orig-src="https://i.imgur.com/f55JSkC.gif" src="https://i2.wp.com/78.media.tumblr.com/332bcce6b8f4711153f3760d469ba547/tumblr_inline_pbnbdtlHpg1srua81_540.gif?resize=450%2C750&ssl=1" data-recalc-dims="1" data-orig-height="750"></figure>
<p><a rel="nofollow" href="https://plot.ly/~Dreamshot/9266/this-example-looks-at-the-rossler-system/#/" target="_blank">Python code</a> | <a rel="nofollow" href="https://plot.ly/~empet/14880/cone-plot-along-a-trajectory-within-the-rossler-attractor/" target="_blank">Link to plot</a></p>
<h2>Cone Plot of a Tangent Vector Field</h2>
<p>In mathematics, a tangent vector is a vector that is tangent to (or just touches) a curve or surface at a given point.</p>
<p>Tangent vector fields are an “<a rel="nofollow" href="https://graphics.stanford.edu/~mdfisher/vectorFieldDesign.html" target="_blank">essential ingredient in controlling appearance for applications ranging from anisotropic shading to texture synthesis and non-photorealistic rendering</a>.”</p>
<p>Below, we examine the tangent vector field along the coordinate lines of a parameterized hyperboloid.</p>
<figure data-orig-width="450" data-orig-src="https://i.imgur.com/0fnduOe.gif" data-orig-height="650"><img data-orig-width="450" data-orig-src="https://i.imgur.com/0fnduOe.gif" src="https://i2.wp.com/78.media.tumblr.com/c8fe0403087fac4a449a5a2ba9d24df6/tumblr_inline_pbnbdtl9Qr1srua81_540.gif?resize=450%2C650&ssl=1" data-recalc-dims="1" data-orig-height="650"></figure>
<p><a rel="nofollow" href="https://plot.ly/~Dreamshot/9269/examine-the-tangent-vector-field-along-t/" target="_blank">Python code</a> | <a rel="nofollow" href="https://raw.githubusercontent.com/plotly/datasets/master/vortex.csv" target="_blank">Data</a> | <a rel="nofollow" href="https://plot.ly/~Dreamshot/9267/#/" target="_blank">Link to plot</a></p>
<p>With <a rel="nofollow" href="https://plot.ly/python/3d-cone/" target="_blank">3-D cone plots</a> in Plotly, you can allow the user to visualize vector fields across a variety of disciplines: meteorology, engineering, mathematics, and more. Bring your vectors to life with cone plots in <a rel="nofollow" href="https://plot.ly/feed/#/" target="_blank">Plotly</a>!</p>
	<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://plotlyblog.tumblr.com/post/175740325442"> Plotly Blog</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 width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/-mtjqeB0WXs" height="1"></a></div>