/usr/share/doc/racket/plot/utils.html is in racket-doc 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>7 Plot Utilities</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Plot:<span class="mywbr"> </span> Graph Plotting</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="intro.html" class="tocviewlink" data-pltdoc="x">Introduction</a></td></tr><tr><td align="right">2 </td><td><a href="plotting.html" class="tocviewlink" data-pltdoc="x">2D and 3D Plotting Procedures</a></td></tr><tr><td align="right">3 </td><td><a href="renderer2d.html" class="tocviewlink" data-pltdoc="x">2D Renderers</a></td></tr><tr><td align="right">4 </td><td><a href="renderer3d.html" class="tocviewlink" data-pltdoc="x">3D Renderers</a></td></tr><tr><td align="right">5 </td><td><a href="nonrenderer.html" class="tocviewlink" data-pltdoc="x">Nonrenderers</a></td></tr><tr><td align="right">6 </td><td><a href="ticks_and_transforms.html" class="tocviewlink" data-pltdoc="x">Axis Transforms and Ticks</a></td></tr><tr><td align="right">7 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Plot Utilities</a></td></tr><tr><td align="right">8 </td><td><a href="params.html" class="tocviewlink" data-pltdoc="x">Plot and Renderer Parameters</a></td></tr><tr><td align="right">9 </td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Plot Contracts</a></td></tr><tr><td align="right">10 </td><td><a href="porting.html" class="tocviewlink" data-pltdoc="x">Porting From Plot <= 5.1.3</a></td></tr><tr><td align="right">11 </td><td><a href="compat.html" class="tocviewlink" data-pltdoc="x">Compatibility Module</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>7 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Plot Utilities</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">7.1 </td><td><a href="#%28part._.Formatting%29" class="tocviewlink" data-pltdoc="x">Formatting</a></td></tr><tr><td align="right">7.2 </td><td><a href="#%28part._.Sampling%29" class="tocviewlink" data-pltdoc="x">Sampling</a></td></tr><tr><td align="right">7.3 </td><td><a href="#%28part._.Plot_.Colors_and_.Styles%29" class="tocviewlink" data-pltdoc="x">Plot Colors and Styles</a></td></tr><tr><td align="right">7.4 </td><td><a href="#%28part._.Plot-.Specific_.Math%29" class="tocviewlink" data-pltdoc="x">Plot-<wbr></wbr>Specific Math</a></td></tr><tr><td align="right">7.5 </td><td><a href="#%28part._.Dates_and_.Times%29" class="tocviewlink" data-pltdoc="x">Dates and Times</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">7.1<tt> </tt></span><a href="#%28part._.Formatting%29" class="tocsubseclink" data-pltdoc="x">Formatting</a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._digits-for-range%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">digits-<wbr></wbr>for-<wbr></wbr>range</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._real-~3eplot-label%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">real-<wbr></wbr>>plot-<wbr></wbr>label</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl-~3eplot-label%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ivl-<wbr></wbr>>plot-<wbr></wbr>label</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3eplot-label%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink"><span class="nobreak">-<wbr></wbr>></span>plot-<wbr></wbr>label</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._real-~3estring%2Ftrunc%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">real-<wbr></wbr>>string/<span class="mywbr"> </span>trunc</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._real-~3edecimal-string%2A%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">real-<wbr></wbr>>decimal-<wbr></wbr>string*</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._integer-~3esuperscript%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">integer-<wbr></wbr>>superscript</span></span></a></td></tr><tr><td><span class="tocsublinknumber">7.2<tt> </tt></span><a href="#%28part._.Sampling%29" class="tocsubseclink" data-pltdoc="x">Sampling</a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">linear-<wbr></wbr>seq</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%2A%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">linear-<wbr></wbr>seq*</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._nonlinear-seq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">nonlinear-<wbr></wbr>seq</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._mapped-function%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">mapped-<wbr></wbr>function</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._kde%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">kde</span></span></a></td></tr><tr><td><span class="tocsublinknumber">7.3<tt> </tt></span><a href="#%28part._.Plot_.Colors_and_.Styles%29" class="tocsubseclink" data-pltdoc="x">Plot Colors and Styles</a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._color-seq%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">color-<wbr></wbr>seq</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._color-seq%2A%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">color-<wbr></wbr>seq*</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ecolor%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink"><span class="nobreak">-<wbr></wbr>></span>color</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3epen-color%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink"><span class="nobreak">-<wbr></wbr>></span>pen-<wbr></wbr>color</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-color%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink"><span class="nobreak">-<wbr></wbr>></span>brush-<wbr></wbr>color</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3epen-style%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink"><span class="nobreak">-<wbr></wbr>></span>pen-<wbr></wbr>style</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-style%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink"><span class="nobreak">-<wbr></wbr>></span>brush-<wbr></wbr>style</span></span></a></td></tr><tr><td><span class="tocsublinknumber">7.4<tt> </tt></span><a href="#%28part._.Plot-.Specific_.Math%29" class="tocsubseclink" data-pltdoc="x">Plot-<wbr></wbr>Specific Math</a></td></tr><tr><td><span class="tocsublinknumber">7.4.1<tt> </tt></span><a href="#%28part._.Real_.Functions%29" class="tocsubseclink" data-pltdoc="x">Real Functions</a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._polar-~3ecartesian%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">polar-<wbr></wbr>>cartesian</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._3d-polar-~3e3d-cartesian%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">3d-<wbr></wbr>polar-<wbr></wbr>>3d-<wbr></wbr>cartesian</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ceiling-log%2Fbase%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ceiling-<wbr></wbr>log/<span class="mywbr"> </span>base</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._floor-log%2Fbase%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">floor-<wbr></wbr>log/<span class="mywbr"> </span>base</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._maybe-inexact-~3eexact%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">maybe-<wbr></wbr>inexact-<wbr></wbr>>exact</span></span></a></td></tr><tr><td><span class="tocsublinknumber">7.4.2<tt> </tt></span><a href="#%28part._math..vectors%29" class="tocsubseclink" data-pltdoc="x">Vector Functions</a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v%2B%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">v+</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v-%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">v-</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vneg%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">vneg</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v%2A%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">v*</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v%2F%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">v/</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v~3d%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">v=</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vcross%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">vcross</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vcross2%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">vcross2</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vdot%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">vdot</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vmag~5e2%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">vmag^2</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vmag%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">vmag</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vnormalize%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">vnormalize</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vcenter%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">vcenter</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vrational~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">vrational?</span></span></a></td></tr><tr><td><span class="tocsublinknumber">7.4.3<tt> </tt></span><a href="#%28part._math..intervals%29" class="tocsubseclink" data-pltdoc="x">Intervals and Interval Functions</a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ivl</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._rational-ivl~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">rational-<wbr></wbr>ivl?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._bounds-~3eintervals%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bounds-<wbr></wbr>>intervals</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._clamp-real%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">clamp-<wbr></wbr>real</span></span></a></td></tr><tr><td><span class="tocsublinknumber">7.5<tt> </tt></span><a href="#%28part._.Dates_and_.Times%29" class="tocsubseclink" data-pltdoc="x">Dates and Times</a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._datetime-~3ereal%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">datetime-<wbr></wbr>>real</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._plot-time%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">plot-<wbr></wbr>time</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._plot-time-~3eseconds%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">plot-<wbr></wbr>time-<wbr></wbr>>seconds</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._seconds-~3eplot-time%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">seconds-<wbr></wbr>>plot-<wbr></wbr>time</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">6.1</span></div><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="ticks_and_transforms.html" title="backward to "6 Axis Transforms and Ticks"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Plot: Graph Plotting"" data-pltdoc="x">up</a> <a href="params.html" title="forward to "8 Plot and Renderer Parameters"" data-pltdoc="x">next →</a></span> </div><h3 x-source-module="(lib "plot/scribblings/plot.scrbl")" x-part-tag=""utils"">7<tt> </tt><a name="(part._utils)"></a><a name="(mod-path._plot/utils)"></a><a name="(mod-path._plot/typed/utils)"></a>Plot Utilities</h3><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">plot/utils</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">plot-lib</span></span></td></tr><tr><td align="left" colspan="2"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">plot/typed/utils</span></a><span class="RktPn">)</span></td></tr></table></p><h4 x-source-module="(lib "plot/scribblings/plot.scrbl")" x-part-tag=""Formatting"">7.1<tt> </tt><a name="(part._.Formatting)"></a>Formatting</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._digits-for-range))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._digits-for-range%29%29" class="RktValDef RktValLink" data-pltdoc="x">digits-for-range</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">x-min</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">x-max</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span>[</td><td><span class="RktVar">base</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">extra-digits</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x-min</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x-max</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">base</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._and%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3e%7E3d%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">>=/c</a></span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">10</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">extra-digits</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">3</span></td></tr></table></blockquote></div><div class="SIntrapara">Given a range, returns the number of decimal places necessary to distinguish numbers in the range.
This may return negative numbers for large ranges.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._digits-for-range%29%29" class="RktValLink" data-pltdoc="x">digits-for-range</a></span><span class="hspace"> </span><span class="RktVal">0.01</span><span class="hspace"> </span><span class="RktVal">0.02</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">5</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._digits-for-range%29%29" class="RktValLink" data-pltdoc="x">digits-for-range</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">100000</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">-2</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._real-~3eplot-label))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._real-~3eplot-label%29%29" class="RktValDef RktValLink" data-pltdoc="x">real->plot-label</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span><span class="RktVar">digits</span><span class="hspace"> </span>[<span class="RktVar">scientific?</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">digits</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">scientific?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Converts a real number to a plot label.
Used to format axis tick labels, <span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._point-label%29%29" class="RktValLink" data-pltdoc="x">point-label</a></span>s, and numbers in legend entries.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">let</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">d</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._digits-for-range%29%29" class="RktValLink" data-pltdoc="x">digits-for-range</a></span><span class="hspace"> </span><span class="RktVal">0.01</span><span class="hspace"> </span><span class="RktVal">0.03</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._real-~3eplot-label%29%29" class="RktValLink" data-pltdoc="x">real->plot-label</a></span><span class="hspace"> </span><span class="RktVal">0.02555555</span><span class="hspace"> </span><span class="RktSym">d</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">".02556"</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._real-~3eplot-label%29%29" class="RktValLink" data-pltdoc="x">real->plot-label</a></span><span class="hspace"> </span><span class="RktVal">2352343</span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-2</span></span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">"2352300"</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._real-~3eplot-label%29%29" class="RktValLink" data-pltdoc="x">real->plot-label</a></span><span class="hspace"> </span><span class="RktVal">1000000000.0</span><span class="hspace"> </span><span class="RktVal">4</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">"1×10⁹"</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._real-~3eplot-label%29%29" class="RktValLink" data-pltdoc="x">real->plot-label</a></span><span class="hspace"> </span><span class="RktVal">1000000000.1234</span><span class="hspace"> </span><span class="RktVal">4</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">"(1×10⁹)+.1234"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._ivl-~3eplot-label))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl-~3eplot-label%29%29" class="RktValDef RktValLink" data-pltdoc="x">ivl->plot-label</a></span></span><span class="hspace"> </span><span class="RktVar">i</span><span class="hspace"> </span>[<span class="RktVar">extra-digits</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">i</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl~3f%29%29" class="RktValLink" data-pltdoc="x">ivl?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">extra-digits</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">3</span></td></tr></table></blockquote></div><div class="SIntrapara">Converts an interval to a plot label.</div></p><p><div class="SIntrapara">If <span class="RktVar">i</span> = <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl%29%29" class="RktValLink" data-pltdoc="x">ivl</a></span><span class="stt"> </span><span class="RktSym">x-min</span><span class="stt"> </span><span class="RktSym">x-max</span><span class="RktPn">)</span>, the number of digits used is <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._digits-for-range%29%29" class="RktValLink" data-pltdoc="x">digits-for-range</a></span><span class="stt"> </span><span class="RktSym">x-min</span><span class="stt"> </span><span class="RktSym">x-max</span><span class="stt"> </span><span class="RktVal">10</span><span class="stt"> </span><span class="RktVar">extra-digits</span><span class="RktPn">)</span> when both endpoints are <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._rational%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">rational?</a></span>.
Otherwise, it is unspecified—<wbr></wbr>but will probably remain <span class="RktVal">15</span>.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl-~3eplot-label%29%29" class="RktValLink" data-pltdoc="x">ivl->plot-label</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl%29%29" class="RktValLink" data-pltdoc="x">ivl</a></span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-1</span>0.52312</span><span class="hspace"> </span><span class="RktVal">10.99232</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">"[-10.52,10.99]"</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl-~3eplot-label%29%29" class="RktValLink" data-pltdoc="x">ivl->plot-label</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl%29%29" class="RktValLink" data-pltdoc="x">ivl</a></span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-i</span>nf.0</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528lib._racket%252Fmath..rkt%2529._pi%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">pi</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">"[-inf.0,3.141592653589793]"</span></p></td></tr></table></blockquote></td></tr></table></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._-~3eplot-label))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3eplot-label%29%29" class="RktValDef RktValLink" data-pltdoc="x"><span class="nobreak">-></span>plot-label</a></span></span><span class="hspace"> </span><span class="RktVar">a</span><span class="hspace"> </span>[<span class="RktVar">digits</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">a</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">digits</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">7</span></td></tr></table></blockquote></div><div class="SIntrapara">Converts a Racket value to a label. Used by <span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._discrete-histogram%29%29" class="RktValLink" data-pltdoc="x">discrete-histogram</a></span> and <span class="RktSym"><a href="renderer3d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._discrete-histogram3d%29%29" class="RktValLink" data-pltdoc="x">discrete-histogram3d</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._real-~3estring/trunc))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._real-~3estring%2Ftrunc%29%29" class="RktValDef RktValLink" data-pltdoc="x">real->string/trunc</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span><span class="RktVar">e</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">e</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._real-%7E3edecimal-string%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real->decimal-string</a></span>, but removes any trailing zeros and any trailing decimal point.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._real-~3edecimal-string*))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._real-~3edecimal-string%2A%29%29" class="RktValDef RktValLink" data-pltdoc="x">real->decimal-string*</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">x</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">min-digits</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span>[</td><td><span class="RktVar">max-digits</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">min-digits</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">max-digits</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVar">min-digits</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._real-%7E3edecimal-string%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real->decimal-string</a></span>, but accepts both a maximum and minimum number of digits.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._real-~3edecimal-string%2A%29%29" class="RktValLink" data-pltdoc="x">real->decimal-string*</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">"1.00000"</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._real-~3edecimal-string%2A%29%29" class="RktValLink" data-pltdoc="x">real->decimal-string*</a></span><span class="hspace"> </span><span class="RktVal">1.123456</span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">"1.123456"</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._real-~3edecimal-string%2A%29%29" class="RktValLink" data-pltdoc="x">real->decimal-string*</a></span><span class="hspace"> </span><span class="RktVal">1.123456789123456</span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktVal">10</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">"1.1234567891"</span></p></td></tr></table></blockquote></td></tr></table></div><div class="SIntrapara">Applying <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._real-~3edecimal-string%2A%29%29" class="RktValLink" data-pltdoc="x">real->decimal-string*</a></span><span class="stt"> </span><span class="RktVar">x</span><span class="stt"> </span><span class="RktVar">min-digits</span><span class="RktPn">)</span> yields the same value as <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._real-%7E3edecimal-string%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real->decimal-string</a></span><span class="stt"> </span><span class="RktVar">x</span><span class="stt"> </span><span class="RktVar">min-digits</span><span class="RktPn">)</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._integer-~3esuperscript))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._integer-~3esuperscript%29%29" class="RktValDef RktValLink" data-pltdoc="x">integer->superscript</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Converts an integer into a string of superscript Unicode characters.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._integer-~3esuperscript%29%29" class="RktValLink" data-pltdoc="x">integer->superscript</a></span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-1</span>234567890</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">"⁻¹²³⁴⁵⁶⁷⁸⁹⁰"</span></p></td></tr></table></blockquote></td></tr></table></div><div class="SIntrapara">Systems running some out-of-date versions of Windows XP have difficulty with Unicode superscripts for 4 and up.
Because <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._integer-~3esuperscript%29%29" class="RktValLink" data-pltdoc="x">integer->superscript</a></span> is used by every number formatting function to format exponents, if you have such a system, Plot will apparently not format all numbers with exponents correctly (until you update it).</div></p><h4 x-source-module="(lib "plot/scribblings/plot.scrbl")" x-part-tag=""Sampling"">7.2<tt> </tt><a name="(part._.Sampling)"></a>Sampling</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._linear-seq))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%29%29" class="RktValDef RktValLink" data-pltdoc="x">linear-seq</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">start</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">end</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">num</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span>[</td><td><span class="RktPn">#:start?</span><span class="hspace"> </span><span class="RktVar">start?</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:end?</span><span class="hspace"> </span><span class="RktVar">end?</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">start</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">end</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">num</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">start?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">end?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a list of uniformly spaced real numbers between <span class="RktVar">start</span> and <span class="RktVar">end</span>.
If <span class="RktVar">start?</span> is <span class="RktVal">#t</span>, the list includes <span class="RktVar">start</span>.
If <span class="RktVar">end?</span> is <span class="RktVal">#t</span>, the list includes <span class="RktVar">end</span>.</div></p><p>This function is used internally to generate sample points.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%29%29" class="RktValLink" data-pltdoc="x">linear-seq</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 1/4 1/2 3/4 1)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%29%29" class="RktValLink" data-pltdoc="x">linear-seq</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktPn">#:start?</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(1/9 1/3 5/9 7/9 1)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%29%29" class="RktValLink" data-pltdoc="x">linear-seq</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktPn">#:end?</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 2/9 4/9 2/3 8/9)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%29%29" class="RktValLink" data-pltdoc="x">linear-seq</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktPn">#:start?</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktPn">#:end?</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(1/10 3/10 1/2 7/10 9/10)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">xs</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%29%29" class="RktValLink" data-pltdoc="x">linear-seq</a></span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-1</span></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">11</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="plotting.html#%28def._%28%28lib._plot%2Fmain..rkt%29._plot%29%29" class="RktValLink" data-pltdoc="x">plot</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._lines%29%29" class="RktValLink" data-pltdoc="x">lines</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">map</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=vectors.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._vector%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vector</a></span><span class="hspace"> </span><span class="RktSym">xs</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">map</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528lib._racket%252Fmath..rkt%2529._sqr%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">sqr</a></span><span class="hspace"> </span><span class="RktSym">xs</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><img style="vertical-align: 0px; margin: -3px -3px -3px -3px;" src="pict_76.png" alt="image" width="406" height="406"/></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._linear-seq*))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%2A%29%29" class="RktValDef RktValLink" data-pltdoc="x">linear-seq*</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">points</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">num</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span>[</td><td><span class="RktPn">#:start?</span><span class="hspace"> </span><span class="RktVar">start?</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:end?</span><span class="hspace"> </span><span class="RktVar">end?</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">points</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">num</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">start?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">end?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%29%29" class="RktValLink" data-pltdoc="x">linear-seq</a></span>, but accepts a list of reals instead of a start and end.
The <span class="RktPn">#:start?</span> and <span class="RktPn">#:end?</span> keyword arguments work as in <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%29%29" class="RktValLink" data-pltdoc="x">linear-seq</a></span>.
This function does not guarantee that each inner value will be in the returned list.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%2A%29%29" class="RktValLink" data-pltdoc="x">linear-seq*</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 1/2 1 3/2 2)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%2A%29%29" class="RktValLink" data-pltdoc="x">linear-seq*</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">6</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 2/5 4/5 6/5 8/5 2)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%2A%29%29" class="RktValLink" data-pltdoc="x">linear-seq*</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(0 1/2 1 1/2 0)</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._nonlinear-seq))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._nonlinear-seq%29%29" class="RktValDef RktValLink" data-pltdoc="x">nonlinear-seq</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">start</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">end</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">num</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">transform</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span>[</td><td><span class="RktPn">#:start?</span><span class="hspace"> </span><span class="RktVar">start?</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:end?</span><span class="hspace"> </span><span class="RktVar">end?</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">start</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">end</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">num</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">transform</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="ticks_and_transforms.html#%28def._%28%28lib._plot%2Fmain..rkt%29._axis-transform%2Fc%29%29" class="RktValLink" data-pltdoc="x">axis-transform/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">start?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">end?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Generates a list of reals that, if transformed using <span class="RktVar">transform</span>, would be uniformly spaced.
This is used to generate samples for transformed axes.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%29%29" class="RktValLink" data-pltdoc="x">linear-seq</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">10</span><span class="hspace"> </span><span class="RktVal">4</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(1 4 7 10)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._nonlinear-seq%29%29" class="RktValLink" data-pltdoc="x">nonlinear-seq</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">10</span><span class="hspace"> </span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktSym"><a href="ticks_and_transforms.html#%28def._%28%28lib._plot%2Fmain..rkt%29._log-transform%29%29" class="RktValLink" data-pltdoc="x">log-transform</a></span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(1.0 2.154434690031884 4.641588833612779 10.000000000000002)</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=parameters.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fmore-scheme..rkt%2529._parameterize%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">parameterize</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym"><a href="ticks_and_transforms.html#%28def._%28%28lib._plot%2Fmain..rkt%29._plot-x-transform%29%29" class="RktValLink" data-pltdoc="x">plot-x-transform</a></span><span class="hspace"> </span><span class="RktSym"><a href="ticks_and_transforms.html#%28def._%28%28lib._plot%2Fmain..rkt%29._log-transform%29%29" class="RktValLink" data-pltdoc="x">log-transform</a></span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="plotting.html#%28def._%28%28lib._plot%2Fmain..rkt%29._plot%29%29" class="RktValLink" data-pltdoc="x">plot</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._area-histogram%29%29" class="RktValLink" data-pltdoc="x">area-histogram</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528lib._racket%252Fmath..rkt%2529._sqr%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">sqr</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._nonlinear-seq%29%29" class="RktValLink" data-pltdoc="x">nonlinear-seq</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">10</span><span class="hspace"> </span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktSym"><a href="ticks_and_transforms.html#%28def._%28%28lib._plot%2Fmain..rkt%29._log-transform%29%29" class="RktValLink" data-pltdoc="x">log-transform</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><img style="vertical-align: 0px; margin: -3px -3px -3px -3px;" src="pict_77.png" alt="image" width="406" height="406"/></p></td></tr></table></blockquote></td></tr></table></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._plot/utils..rkt)._mapped-function-fmap))"></a><a name="(def._((lib._plot/utils..rkt)._mapped-function-f))"></a><a name="(def._((lib._plot/utils..rkt)._make-mapped-function))"></a><a name="(def._((lib._plot/utils..rkt)._mapped-function~3f))"></a><a name="(def._((lib._plot/utils..rkt)._struct~3amapped-function))"></a><a name="(def._((lib._plot/utils..rkt)._mapped-function))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._mapped-function%29%29" class="RktValDef RktValLink" data-pltdoc="x">mapped-function</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">f</span><span class="stt"> </span><span class="RktSym">fmap</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym">make-mapped-function</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">f</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">fmap</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Represents a function that maps over lists differently than <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">map</a></span><span class="stt"> </span><span class="RktSym">f</span><span class="stt"> </span><span class="RktSym">xs</span><span class="RktPn">)</span>.</div></p><p>With some functions, mapping over a list can be done much more quickly if done specially.
(An example is a piecewise function with many pieces that first must decide which interval its input belongs to. Deciding that for many inputs can be done more efficiently by sorting all the inputs first.)
Renderer-producing functions that accept a <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="stt"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="stt"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span> also accept a <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._mapped-function%29%29" class="RktValLink" data-pltdoc="x">mapped-function</a></span>, and use its <span class="RktSym">fmap</span> to sample more efficiently.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._kde))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._kde%29%29" class="RktValDef RktValLink" data-pltdoc="x">kde</a></span></span><span class="hspace"> </span><span class="RktVar">xs</span><span class="hspace"> </span><span class="RktVar">h</span><span class="hspace"> </span>[<span class="RktVar">ws</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0"><tr><td><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._mapped-function~3f%29%29" class="RktValLink" data-pltdoc="x">mapped-function?</a></span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._rational%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">rational?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._rational%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">rational?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">xs</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">h</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3e%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">>/c</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ws</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3e%7E3d%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">>=/c</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Given optionally weighted samples and a kernel bandwidth, returns a <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._mapped-function%29%29" class="RktValLink" data-pltdoc="x">mapped-function</a></span> representing a kernel density estimate, and bounds, outside of which the density estimate is zero.
Used by <span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._density%29%29" class="RktValLink" data-pltdoc="x">density</a></span>.</div></p><h4 x-source-module="(lib "plot/scribblings/plot.scrbl")" x-part-tag=""Plot_Colors_and_Styles"">7.3<tt> </tt><a name="(part._.Plot_.Colors_and_.Styles)"></a>Plot Colors and Styles</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._color-seq))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._color-seq%29%29" class="RktValDef RktValLink" data-pltdoc="x">color-seq</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">c1</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">c2</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">num</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span>[</td><td><span class="RktPn">#:start?</span><span class="hspace"> </span><span class="RktVar">start?</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:end?</span><span class="hspace"> </span><span class="RktVar">end?</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">c1</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="contracts.html#%28def._%28%28lib._plot%2Futils..rkt%29._color%2Fc%29%29" class="RktValLink" data-pltdoc="x">color/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">c2</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="contracts.html#%28def._%28%28lib._plot%2Futils..rkt%29._color%2Fc%29%29" class="RktValLink" data-pltdoc="x">color/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">num</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">start?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">end?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Interpolates between colors—<wbr></wbr>red, green and blue components separately—<wbr></wbr>using <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%29%29" class="RktValLink" data-pltdoc="x">linear-seq</a></span>.
The <span class="RktPn">#:start?</span> and <span class="RktPn">#:end?</span> keyword arguments work as in <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%29%29" class="RktValLink" data-pltdoc="x">linear-seq</a></span>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="plotting.html#%28def._%28%28lib._plot%2Fmain..rkt%29._plot%29%29" class="RktValLink" data-pltdoc="x">plot</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._contour-intervals%29%29" class="RktValLink" data-pltdoc="x">contour-intervals</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">λ</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-2</span></span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-2</span></span><span class="hspace"> </span><span class="RktVal">2</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:levels</span><span class="hspace"> </span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktPn">#:contour-styles</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">transparent</span><span class="RktVal">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:colors</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._color-seq%29%29" class="RktValLink" data-pltdoc="x">color-seq</a></span><span class="hspace"> </span><span class="RktVal">"red"</span><span class="hspace"> </span><span class="RktVal">"blue"</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><img style="vertical-align: 0px; margin: -3px -3px -3px -3px;" src="pict_78.png" alt="image" width="406" height="406"/></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._color-seq*))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._color-seq%2A%29%29" class="RktValDef RktValLink" data-pltdoc="x">color-seq*</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">colors</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">num</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span>[</td><td><span class="RktPn">#:start?</span><span class="hspace"> </span><span class="RktVar">start?</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:end?</span><span class="hspace"> </span><span class="RktVar">end?</span>]<span class="RktPn">)</span></td><td><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">colors</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="contracts.html#%28def._%28%28lib._plot%2Futils..rkt%29._color%2Fc%29%29" class="RktValLink" data-pltdoc="x">color/c</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">num</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">start?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">end?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Interpolates between colors—<wbr></wbr>red, green and blue components separately—<wbr></wbr>using <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%2A%29%29" class="RktValLink" data-pltdoc="x">linear-seq*</a></span>.
The <span class="RktPn">#:start?</span> and <span class="RktPn">#:end?</span> keyword arguments work as in <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%29%29" class="RktValLink" data-pltdoc="x">linear-seq</a></span>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="plotting.html#%28def._%28%28lib._plot%2Fmain..rkt%29._plot%29%29" class="RktValLink" data-pltdoc="x">plot</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._contour-intervals%29%29" class="RktValLink" data-pltdoc="x">contour-intervals</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">λ</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-2</span></span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-2</span></span><span class="hspace"> </span><span class="RktVal">2</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:levels</span><span class="hspace"> </span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktPn">#:contour-styles</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">transparent</span><span class="RktVal">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:colors</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._color-seq%2A%29%29" class="RktValLink" data-pltdoc="x">color-seq*</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">red</span><span class="hspace"> </span><span class="RktVal">white</span><span class="hspace"> </span><span class="RktVal">blue</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><img style="vertical-align: 0px; margin: -3px -3px -3px -3px;" src="pict_79.png" alt="image" width="406" height="406"/></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._-~3ecolor))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ecolor%29%29" class="RktValDef RktValLink" data-pltdoc="x"><span class="nobreak">-></span>color</a></span></span><span class="hspace"> </span><span class="RktVar">c</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">c</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="contracts.html#%28def._%28%28lib._plot%2Futils..rkt%29._color%2Fc%29%29" class="RktValLink" data-pltdoc="x">color/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Converts a non-integer plot color to an RGB triplet.</div></p><p>Symbols are converted to strings, and strings are looked up in a <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=draw&rel=color-database___.html&version=6.1" class="RktValLink Sq" data-pltdoc="x">color-database<%></a></span>.
Lists are unchanged, and <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=draw&rel=color_.html&version=6.1" class="RktValLink Sq" data-pltdoc="x">color%</a></span> objects are converted straightforwardly.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ecolor%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>color</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">navy</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(36 36 140)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ecolor%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>color</a></span><span class="hspace"> </span><span class="RktVal">"navy"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(36 36 140)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ecolor%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>color</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">36</span><span class="hspace"> </span><span class="RktVal">36</span><span class="hspace"> </span><span class="RktVal">140</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(36 36 140)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ecolor%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>color</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=objcreation.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fclass-internal..rkt%2529._make-object%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">make-object</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=draw&rel=color_.html&version=6.1" class="RktValLink Sq" data-pltdoc="x">color%</a></span><span class="hspace"> </span><span class="RktVal">36</span><span class="hspace"> </span><span class="RktVal">36</span><span class="hspace"> </span><span class="RktVal">140</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(36 36 140)</span></p></td></tr></table></blockquote></td></tr></table></p><p>This function does not convert integers to RGB triplets, because there is no way for it to know whether the color will be used for a pen or for a brush.
Use <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3epen-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>pen-color</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-color</a></span> to convert integers.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._-~3epen-color))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3epen-color%29%29" class="RktValDef RktValLink" data-pltdoc="x"><span class="nobreak">-></span>pen-color</a></span></span><span class="hspace"> </span><span class="RktVar">c</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">c</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="contracts.html#%28def._%28%28lib._plot%2Futils..rkt%29._plot-color%2Fc%29%29" class="RktValLink" data-pltdoc="x">plot-color/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Converts a <span style="font-style: italic">line</span> color to an RGB triplet. This function interprets integer colors as darker and more saturated than <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-color</a></span> does.</div></p><p>Non-integer colors are converted using <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ecolor%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>color</a></span>.
Integer colors are chosen for good pairwise contrast, especially between neighbors.
Integer colors repeat starting with <span class="RktVal">128</span>.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._equal%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">equal?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3epen-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>pen-color</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3epen-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>pen-color</a></span><span class="hspace"> </span><span class="RktVal">8</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="plotting.html#%28def._%28%28lib._plot%2Fmain..rkt%29._plot%29%29" class="RktValLink" data-pltdoc="x">plot</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._contour-intervals%29%29" class="RktValLink" data-pltdoc="x">contour-intervals</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">λ</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-2</span></span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-2</span></span><span class="hspace"> </span><span class="RktVal">2</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:levels</span><span class="hspace"> </span><span class="RktVal">7</span><span class="hspace"> </span><span class="RktPn">#:contour-styles</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">transparent</span><span class="RktVal">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:colors</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">map</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3epen-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>pen-color</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Flist..rkt%2529._build-list%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">build-list</a></span><span class="hspace"> </span><span class="RktVal">8</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=values.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._values%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">values</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><img style="vertical-align: 0px; margin: -3px -3px -3px -3px;" src="pict_80.png" alt="image" width="406" height="406"/></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._-~3ebrush-color))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-color%29%29" class="RktValDef RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-color</a></span></span><span class="hspace"> </span><span class="RktVar">c</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">c</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="contracts.html#%28def._%28%28lib._plot%2Futils..rkt%29._plot-color%2Fc%29%29" class="RktValLink" data-pltdoc="x">plot-color/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Converts a <span style="font-style: italic">fill</span> color to an RGB triplet. This function interprets integer colors as lighter and less saturated than <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3epen-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>pen-color</a></span> does.</div></p><p>Non-integer colors are converted using <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ecolor%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>color</a></span>.
Integer colors are chosen for good pairwise contrast, especially between neighbors.
Integer colors repeat starting with <span class="RktVal">128</span>.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._equal%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">equal?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-color</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-color</a></span><span class="hspace"> </span><span class="RktVal">8</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="plotting.html#%28def._%28%28lib._plot%2Fmain..rkt%29._plot%29%29" class="RktValLink" data-pltdoc="x">plot</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._contour-intervals%29%29" class="RktValLink" data-pltdoc="x">contour-intervals</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">λ</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-2</span></span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-2</span></span><span class="hspace"> </span><span class="RktVal">2</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:levels</span><span class="hspace"> </span><span class="RktVal">7</span><span class="hspace"> </span><span class="RktPn">#:contour-styles</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">transparent</span><span class="RktVal">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:colors</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">map</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-color</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Flist..rkt%2529._build-list%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">build-list</a></span><span class="hspace"> </span><span class="RktVal">8</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=values.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._values%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">values</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><img style="vertical-align: 0px; margin: -3px -3px -3px -3px;" src="pict_81.png" alt="image" width="406" height="406"/></p></td></tr></table></blockquote></td></tr></table></p><p>In the above example, <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">map</a></span>ping <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-color</a></span> over the list is actually unnecessary, because <span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._contour-intervals%29%29" class="RktValLink" data-pltdoc="x">contour-intervals</a></span> uses <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-color</a></span> internally to convert fill colors.</p><p><div class="SIntrapara">The <span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._function-interval%29%29" class="RktValLink" data-pltdoc="x">function-interval</a></span> function generally plots areas using a fill color and lines using a line color.
Both kinds of color have the default value <span class="RktVal">3</span>.
The following example reverses the default behavior; i.e it draws areas using <span style="font-style: italic">line</span> color <span class="RktVal">3</span> and lines using <span style="font-style: italic">fill</span> color <span class="RktVal">3</span>:
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="plotting.html#%28def._%28%28lib._plot%2Fmain..rkt%29._plot%29%29" class="RktValLink" data-pltdoc="x">plot</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._function-interval%29%29" class="RktValLink" data-pltdoc="x">function-interval</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._sin%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">sin</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">λ</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-4</span></span><span class="hspace"> </span><span class="RktVal">4</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:color</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3epen-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>pen-color</a></span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:line1-color</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-color</a></span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:line2-color</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-color%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-color</a></span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:line1-width</span><span class="hspace"> </span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktPn">#:line2-width</span><span class="hspace"> </span><span class="RktVal">4</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><img style="vertical-align: 0px; margin: -3px -3px -3px -3px;" src="pict_82.png" alt="image" width="406" height="406"/></p></td></tr></table></blockquote></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._-~3epen-style))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3epen-style%29%29" class="RktValDef RktValLink" data-pltdoc="x"><span class="nobreak">-></span>pen-style</a></span></span><span class="hspace"> </span><span class="RktVar">s</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">s</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="contracts.html#%28def._%28%28lib._plot%2Futils..rkt%29._plot-pen-style%2Fc%29%29" class="RktValLink" data-pltdoc="x">plot-pen-style/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Converts a symbolic pen style or a number to a symbolic pen style.
Symbols are unchanged.
Integer pen styles repeat starting at <span class="RktVal">5</span>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._eq%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">eq?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3epen-style%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>pen-style</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3epen-style%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>pen-style</a></span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">map</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3epen-style%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>pen-style</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(solid dot long-dash short-dash dot-dash)</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._-~3ebrush-style))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-style%29%29" class="RktValDef RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-style</a></span></span><span class="hspace"> </span><span class="RktVar">s</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">s</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="contracts.html#%28def._%28%28lib._plot%2Futils..rkt%29._plot-brush-style%2Fc%29%29" class="RktValLink" data-pltdoc="x">plot-brush-style/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Converts a symbolic brush style or a number to a symbolic brush style.
Symbols are unchanged.
Integer brush styles repeat starting at <span class="RktVal">7</span>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._eq%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">eq?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-style%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-style</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-style%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-style</a></span><span class="hspace"> </span><span class="RktVal">7</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">map</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-style%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-style</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(solid bdiagonal-hatch fdiagonal-hatch crossdiag-hatch)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">map</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._-~3ebrush-style%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-></span>brush-style</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktVal">6</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(horizontal-hatch vertical-hatch cross-hatch)</span></p></td></tr></table></blockquote></td></tr></table></p><h4 x-source-module="(lib "plot/scribblings/plot.scrbl")" x-part-tag=""Plot-Specific_Math"">7.4<tt> </tt><a name="(part._.Plot-.Specific_.Math)"></a>Plot-Specific Math</h4><h5 x-source-module="(lib "plot/scribblings/plot.scrbl")" x-part-tag=""Real_Functions"">7.4.1<tt> </tt><a name="(part._.Real_.Functions)"></a>Real Functions</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._polar-~3ecartesian))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._polar-~3ecartesian%29%29" class="RktValDef RktValLink" data-pltdoc="x">polar->cartesian</a></span></span><span class="hspace"> </span><span class="RktVar">θ</span><span class="hspace"> </span><span class="RktVar">r</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vector%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vector/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">θ</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">r</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Converts 2D polar coordinates to 3D cartesian coordinates.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._3d-polar-~3e3d-cartesian))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._3d-polar-~3e3d-cartesian%29%29" class="RktValDef RktValLink" data-pltdoc="x">3d-polar->3d-cartesian</a></span></span><span class="hspace"> </span><span class="RktVar">θ</span><span class="hspace"> </span><span class="RktVar">ρ</span><span class="hspace"> </span><span class="RktVar">r</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vector%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vector/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">θ</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">ρ</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">r</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Converts 3D polar coordinates to 3D cartesian coordinates.
See <span class="RktSym"><a href="renderer3d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._parametric3d%29%29" class="RktValLink" data-pltdoc="x">parametric3d</a></span> for an example of use.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._ceiling-log/base))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ceiling-log%2Fbase%29%29" class="RktValDef RktValLink" data-pltdoc="x">ceiling-log/base</a></span></span><span class="hspace"> </span><span class="RktVar">b</span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">b</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._and%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3e%7E3d%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">>=/c</a></span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3e%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">>/c</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._ceiling%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">ceiling</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252F%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">/</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._log%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">log</a></span><span class="stt"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._log%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">log</a></span><span class="stt"> </span><span class="RktVar">b</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span>, but <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ceiling-log%2Fbase%29%29" class="RktValLink" data-pltdoc="x">ceiling-log/base</a></span> is not susceptible to floating-point error.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._ceiling%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">ceiling</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252F%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">/</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._log%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">log</a></span><span class="hspace"> </span><span class="RktVal">100</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._log%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">log</a></span><span class="hspace"> </span><span class="RktVal">10</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">2.0</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ceiling-log%2Fbase%29%29" class="RktValLink" data-pltdoc="x">ceiling-log/base</a></span><span class="hspace"> </span><span class="RktVal">10</span><span class="hspace"> </span><span class="RktVal">100</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">2</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._ceiling%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">ceiling</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252F%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">/</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._log%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">log</a></span><span class="hspace"> </span><span class="RktVal">1/1000</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._log%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">log</a></span><span class="hspace"> </span><span class="RktVal">10</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">-2.0</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ceiling-log%2Fbase%29%29" class="RktValLink" data-pltdoc="x">ceiling-log/base</a></span><span class="hspace"> </span><span class="RktVal">10</span><span class="hspace"> </span><span class="RktVal">1/1000</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">-3</span></p></td></tr></table></blockquote></td></tr></table></div><div class="SIntrapara">Various number-formatting functions use this.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._floor-log/base))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._floor-log%2Fbase%29%29" class="RktValDef RktValLink" data-pltdoc="x">floor-log/base</a></span></span><span class="hspace"> </span><span class="RktVar">b</span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">b</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._and%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3e%7E3d%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">>=/c</a></span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3e%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">>/c</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._floor%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">floor</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252F%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">/</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._log%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">log</a></span><span class="stt"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._log%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">log</a></span><span class="stt"> </span><span class="RktVar">b</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span>, but <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._floor-log%2Fbase%29%29" class="RktValLink" data-pltdoc="x">floor-log/base</a></span> is not susceptible to floating-point error.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._floor%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">floor</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252F%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">/</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._log%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">log</a></span><span class="hspace"> </span><span class="RktVal">100</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._log%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">log</a></span><span class="hspace"> </span><span class="RktVal">10</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">2.0</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._floor-log%2Fbase%29%29" class="RktValLink" data-pltdoc="x">floor-log/base</a></span><span class="hspace"> </span><span class="RktVal">10</span><span class="hspace"> </span><span class="RktVal">100</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">2</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._floor%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">floor</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252F%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">/</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._log%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">log</a></span><span class="hspace"> </span><span class="RktVal">1000</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._log%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">log</a></span><span class="hspace"> </span><span class="RktVal">10</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">2.0</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._floor-log%2Fbase%29%29" class="RktValLink" data-pltdoc="x">floor-log/base</a></span><span class="hspace"> </span><span class="RktVal">10</span><span class="hspace"> </span><span class="RktVal">1000</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">3</span></p></td></tr></table></blockquote></td></tr></table></div><div class="SIntrapara">This is a generalization of <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528lib._racket%252Fmath..rkt%2529._order-of-magnitude%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">order-of-magnitude</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._maybe-inexact-~3eexact))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._maybe-inexact-~3eexact%29%29" class="RktValDef RktValLink" data-pltdoc="x">maybe-inexact->exact</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._rational%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">rational?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._rational%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">rational?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#f</span> if <span class="RktVar">x</span> is <span class="RktVal">#f</span>; otherwise <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._inexact-%7E3eexact%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">inexact->exact</a></span><span class="stt"> </span><span class="RktVar">x</span><span class="RktPn">)</span>.
Use this to convert interval endpoints, which may be <span class="RktVal">#f</span>, to exact numbers.</div></p><h5 x-source-module="(lib "plot/scribblings/plot.scrbl")" x-part-tag=""math.vectors"">7.4.2<tt> </tt><a name="(part._math..vectors)"></a>Vector Functions</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._v+))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v%2B%29%29" class="RktValDef RktValLink" data-pltdoc="x">v+</a></span></span><span class="hspace"> </span><span class="RktVar">v1</span><span class="hspace"> </span><span class="RktVar">v2</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v1</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v2</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._v-))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v-%29%29" class="RktValDef RktValLink" data-pltdoc="x">v-</a></span></span><span class="hspace"> </span><span class="RktVar">v1</span><span class="hspace"> </span><span class="RktVar">v2</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v1</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v2</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._vneg))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vneg%29%29" class="RktValDef RktValLink" data-pltdoc="x">vneg</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._v*))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v%2A%29%29" class="RktValDef RktValLink" data-pltdoc="x">v*</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktVar">c</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">c</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._v/))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v%2F%29%29" class="RktValDef RktValLink" data-pltdoc="x">v/</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span><span class="RktVar">c</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">c</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Vector arithmetic. Equivalent to <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=vectors.html%23%2528def._%2528%2528lib._racket%252Fvector..rkt%2529._vector-map%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vector-map</a></span>p-ing arithmetic operators over vectors, but specialized so that 2- and 3-vector operations are much faster.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v%2B%29%29" class="RktValLink" data-pltdoc="x">v+</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'#(4 6)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v-%29%29" class="RktValLink" data-pltdoc="x">v-</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'#(-2 -2)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vneg%29%29" class="RktValLink" data-pltdoc="x">vneg</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'#(-1 -2)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v%2A%29%29" class="RktValLink" data-pltdoc="x">v*</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'#(2 4 6)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v%2F%29%29" class="RktValLink" data-pltdoc="x">v/</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'#(1/2 1 3/2)</span></p></td></tr></table></blockquote></td></tr></table></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._v~3d))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v~3d%29%29" class="RktValDef RktValLink" data-pltdoc="x">v=</a></span></span><span class="hspace"> </span><span class="RktVar">v1</span><span class="hspace"> </span><span class="RktVar">v2</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v1</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v2</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._equal%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">equal?</a></span> specialized to numeric vectors, but compares elements using <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3d%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">=</a></span>.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._equal%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">equal?</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._equal%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">equal?</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1.0</span><span class="hspace"> </span><span class="RktVal">2.0</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._v~3d%29%29" class="RktValLink" data-pltdoc="x">v=</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1.0</span><span class="hspace"> </span><span class="RktVal">2.0</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr></table></blockquote></td></tr></table></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._vcross))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vcross%29%29" class="RktValDef RktValLink" data-pltdoc="x">vcross</a></span></span><span class="hspace"> </span><span class="RktVar">v1</span><span class="hspace"> </span><span class="RktVar">v2</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vector%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vector/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v1</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vector%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vector/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v2</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vector%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vector/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the right-hand vector cross product of <span class="RktVar">v1</span> and <span class="RktVar">v2</span>.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vcross%29%29" class="RktValLink" data-pltdoc="x">vcross</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'#(0 0 1)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vcross%29%29" class="RktValLink" data-pltdoc="x">vcross</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'#(0 0 -1)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vcross%29%29" class="RktValLink" data-pltdoc="x">vcross</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'#(0 0 0)</span></p></td></tr></table></blockquote></td></tr></table></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._vcross2))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vcross2%29%29" class="RktValDef RktValLink" data-pltdoc="x">vcross2</a></span></span><span class="hspace"> </span><span class="RktVar">v1</span><span class="hspace"> </span><span class="RktVar">v2</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v1</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vector%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vector/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v2</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vector%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vector/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the signed area of the 2D parallelogram with sides <span class="RktVar">v1</span> and <span class="RktVar">v2</span>.
Equivalent to <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=vectors.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._vector-ref%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vector-ref</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vcross%29%29" class="RktValLink" data-pltdoc="x">vcross</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=vectors.html%23%2528def._%2528%2528lib._racket%252Fvector..rkt%2529._vector-append%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vector-append</a></span><span class="stt"> </span><span class="RktVar">v1</span><span class="stt"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">0</span><span class="RktVal">)</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=vectors.html%23%2528def._%2528%2528lib._racket%252Fvector..rkt%2529._vector-append%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vector-append</a></span><span class="stt"> </span><span class="RktVar">v2</span><span class="stt"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">0</span><span class="RktVal">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktVal">2</span><span class="RktPn">)</span> but faster.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vcross2%29%29" class="RktValLink" data-pltdoc="x">vcross2</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">1</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vcross2%29%29" class="RktValLink" data-pltdoc="x">vcross2</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">-1</span></p></td></tr></table></blockquote></td></tr></table></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._vdot))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vdot%29%29" class="RktValDef RktValLink" data-pltdoc="x">vdot</a></span></span><span class="hspace"> </span><span class="RktVar">v1</span><span class="hspace"> </span><span class="RktVar">v2</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v1</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v2</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the dot product of <span class="RktVar">v1</span> and <span class="RktVar">v2</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._vmag~5e2))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vmag~5e2%29%29" class="RktValDef RktValLink" data-pltdoc="x">vmag^2</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the squared magnitude of <span class="RktVar">v</span>. Equivalent to <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vdot%29%29" class="RktValLink" data-pltdoc="x">vdot</a></span><span class="stt"> </span><span class="RktVar">v</span><span class="stt"> </span><span class="RktVar">v</span><span class="RktPn">)</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._vmag))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vmag%29%29" class="RktValDef RktValLink" data-pltdoc="x">vmag</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the magnitude of <span class="RktVar">v</span>. Equivalent to <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._sqrt%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">sqrt</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vmag~5e2%29%29" class="RktValLink" data-pltdoc="x">vmag^2</a></span><span class="stt"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="RktPn">)</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._vnormalize))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vnormalize%29%29" class="RktValDef RktValLink" data-pltdoc="x">vnormalize</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a normal vector in the same direction as <span class="RktVar">v</span>. If <span class="RktVar">v</span> is a zero vector, returns <span class="RktVar">v</span>.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vnormalize%29%29" class="RktValLink" data-pltdoc="x">vnormalize</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'#(0.7071067811865475 0.7071067811865475 0)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vnormalize%29%29" class="RktValLink" data-pltdoc="x">vnormalize</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'#(0.5773502691896258 0.5773502691896258 0.5773502691896258)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vnormalize%29%29" class="RktValLink" data-pltdoc="x">vnormalize</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">0.0</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'#(0 0 0.0)</span></p></td></tr></table></blockquote></td></tr></table></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._vcenter))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vcenter%29%29" class="RktValDef RktValLink" data-pltdoc="x">vcenter</a></span></span><span class="hspace"> </span><span class="RktVar">vs</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">vs</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the center of the smallest bounding box that contains <span class="RktVar">vs</span>.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vcenter%29%29" class="RktValLink" data-pltdoc="x">vcenter</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'#(3/2 3/2)</span></p></td></tr></table></blockquote></td></tr></table></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._vrational~3f))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vrational~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">vrational?</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vectorof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">vectorof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if every element of <span class="RktVar">v</span> is <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._rational%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">rational?</a></span>.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vrational~3f%29%29" class="RktValLink" data-pltdoc="x">vrational?</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vrational~3f%29%29" class="RktValLink" data-pltdoc="x">vrational?</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">+inf.0</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._vrational~3f%29%29" class="RktValLink" data-pltdoc="x">vrational?</a></span><span class="hspace"> </span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr></table></blockquote></td></tr></table></div></p><h5 x-source-module="(lib "plot/scribblings/plot.scrbl")" x-part-tag=""math.intervals"">7.4.3<tt> </tt><a name="(part._math..intervals)"></a>Intervals and Interval Functions</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._plot/utils..rkt)._ivl-max))"></a><a name="(def._((lib._plot/utils..rkt)._ivl-min))"></a><a name="(def._((lib._plot/utils..rkt)._make-ivl))"></a><a name="(def._((lib._plot/utils..rkt)._ivl~3f))"></a><a name="(def._((lib._plot/utils..rkt)._struct~3aivl))"></a><a name="(def._((lib._plot/utils..rkt)._ivl))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl%29%29" class="RktValDef RktValLink" data-pltdoc="x">ivl</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">min</span><span class="stt"> </span><span class="RktSym">max</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym">make-ivl</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">min</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">max</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Represents a closed interval.</div></p><p><div class="SIntrapara">An interval with two real-valued endpoints always contains the endpoints in order:
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl%29%29" class="RktValLink" data-pltdoc="x">ivl</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(ivl 0 1)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl%29%29" class="RktValLink" data-pltdoc="x">ivl</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(ivl 0 1)</span></p></td></tr></table></blockquote></div></p><p><div class="SIntrapara">An interval can have infinite endpoints:
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl%29%29" class="RktValLink" data-pltdoc="x">ivl</a></span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-i</span>nf.0</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(ivl -inf.0 0)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl%29%29" class="RktValLink" data-pltdoc="x">ivl</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">+inf.0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(ivl 0 +inf.0)</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl%29%29" class="RktValLink" data-pltdoc="x">ivl</a></span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-i</span>nf.0</span><span class="hspace"> </span><span class="RktVal">+inf.0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(ivl -inf.0 +inf.0)</span></p></td></tr></table></blockquote></div></p><p>Functions that return rectangle renderers, such as <span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._rectangles%29%29" class="RktValLink" data-pltdoc="x">rectangles</a></span> and <span class="RktSym"><a href="renderer3d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._discrete-histogram3d%29%29" class="RktValLink" data-pltdoc="x">discrete-histogram3d</a></span>, accept vectors of <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl%29%29" class="RktValLink" data-pltdoc="x">ivl</a></span>s as arguments.
The <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl%29%29" class="RktValLink" data-pltdoc="x">ivl</a></span> struct type is also provided by <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">plot</span></a> so users of such renderers do not have to require <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">plot/utils</span></a>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._rational-ivl~3f))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._rational-ivl~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">rational-ivl?</a></span></span><span class="hspace"> </span><span class="RktVar">i</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">i</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">i</span> is an interval and each of its endpoints is <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._rational%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">rational?</a></span>.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">map</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._rational-ivl~3f%29%29" class="RktValLink" data-pltdoc="x">rational-ivl?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl%29%29" class="RktValLink" data-pltdoc="x">ivl</a></span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-1</span></span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl%29%29" class="RktValLink" data-pltdoc="x">ivl</a></span><span class="hspace"> </span><span class="RktVal"><span class="nobreak">-i</span>nf.0</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">bob</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(#t #f #f)</span></p></td></tr></table></blockquote></td></tr></table></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._bounds-~3eintervals))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._bounds-~3eintervals%29%29" class="RktValDef RktValLink" data-pltdoc="x">bounds->intervals</a></span></span><span class="hspace"> </span><span class="RktVar">xs</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl~3f%29%29" class="RktValLink" data-pltdoc="x">ivl?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">xs</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Given a list of points, returns intervals between each pair.</div></p><p><div class="SIntrapara">Use this to construct inputs for <span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._rectangles%29%29" class="RktValLink" data-pltdoc="x">rectangles</a></span> and <span class="RktSym"><a href="renderer3d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._rectangles3d%29%29" class="RktValLink" data-pltdoc="x">rectangles3d</a></span>.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._bounds-~3eintervals%29%29" class="RktValLink" data-pltdoc="x">bounds->intervals</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._linear-seq%29%29" class="RktValLink" data-pltdoc="x">linear-seq</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(list (ivl 0 1/4) (ivl 1/4 1/2) (ivl 1/2 3/4) (ivl 3/4 1))</span></p></td></tr></table></blockquote></td></tr></table></div></p><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._clamp-real))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._clamp-real%29%29" class="RktValDef RktValLink" data-pltdoc="x">clamp-real</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span><span class="RktVar">i</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">i</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._ivl~3f%29%29" class="RktValLink" data-pltdoc="x">ivl?</a></span></td></tr></table></blockquote><h4 x-source-module="(lib "plot/scribblings/plot.scrbl")" x-part-tag=""Dates_and_Times"">7.5<tt> </tt><a name="(part._.Dates_and_.Times)"></a>Dates and Times</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._datetime-~3ereal))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._datetime-~3ereal%29%29" class="RktValDef RktValLink" data-pltdoc="x">datetime->real</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._plot-time~3f%29%29" class="RktValLink" data-pltdoc="x">plot-time?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=time.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._date%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">date?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=time.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._date%252A%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">date*?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=db&rel=sql-types.html%23%2528def._%2528%2528lib._db%252Fbase..rkt%2529._sql-date%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">sql-date?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=db&rel=sql-types.html%23%2528def._%2528%2528lib._db%252Fbase..rkt%2529._sql-time%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">sql-time?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=db&rel=sql-types.html%23%2528def._%2528%2528lib._db%252Fbase..rkt%2529._sql-timestamp%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">sql-timestamp?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Converts various date/time representations into UTC seconds, respecting time zone offsets.</div></p><p>For dates, the value returned is the number of seconds since <span style="font-style: italic">a system-dependent UTC epoch</span>.
See <span class="RktSym"><a href="ticks_and_transforms.html#%28def._%28%28lib._plot%2Fmain..rkt%29._date-ticks%29%29" class="RktValLink" data-pltdoc="x">date-ticks</a></span> for more information.</p><p>To plot a time series using dates pulled from an SQL database, simply set the relevant axis ticks (probably <span class="RktSym"><a href="ticks_and_transforms.html#%28def._%28%28lib._plot%2Fmain..rkt%29._plot-x-ticks%29%29" class="RktValLink" data-pltdoc="x">plot-x-ticks</a></span>) to <span class="RktSym"><a href="ticks_and_transforms.html#%28def._%28%28lib._plot%2Fmain..rkt%29._date-ticks%29%29" class="RktValLink" data-pltdoc="x">date-ticks</a></span>, and convert the dates to seconds using <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._datetime-~3ereal%29%29" class="RktValLink" data-pltdoc="x">datetime->real</a></span> before passing them to <span class="RktSym"><a href="renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._lines%29%29" class="RktValLink" data-pltdoc="x">lines</a></span>.
To keep time zone offsets from influencing the plot, set them to <span class="RktVal">0</span> first.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>struct</p></div></div><table cellspacing="0" cellpadding="0" class="RForeground"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">struct</a></span></td><td><span class="hspace"> </span></td><td><a name="(def._((lib._plot/utils..rkt)._plot-time-day))"></a><a name="(def._((lib._plot/utils..rkt)._plot-time-hour))"></a><a name="(def._((lib._plot/utils..rkt)._plot-time-minute))"></a><a name="(def._((lib._plot/utils..rkt)._plot-time-second))"></a><a name="(def._((lib._plot/utils..rkt)._make-plot-time))"></a><a name="(def._((lib._plot/utils..rkt)._plot-time~3f))"></a><a name="(def._((lib._plot/utils..rkt)._struct~3aplot-time))"></a><a name="(def._((lib._plot/utils..rkt)._plot-time))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._plot-time%29%29" class="RktValDef RktValLink" data-pltdoc="x">plot-time</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">second</span><span class="stt"> </span><span class="RktSym">minute</span><span class="stt"> </span><span class="RktSym">hour</span><span class="stt"> </span><span class="RktSym">day</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:extra-constructor-name</span><span class="hspace"> </span><span class="RktSym">make-plot-time</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">second</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._and%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">and/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3e%7E3d%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">>=/c</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._%7E3c%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x"></c</a></span><span class="hspace"> </span><span class="RktVal">60</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">minute</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._integer-in%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">59</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">hour</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._integer-in%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">23</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym">day</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-integer?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A time representation that accounts for days, negative times (using negative days), and fractional seconds.</div></p><p>Plot (specifically <span class="RktSym"><a href="ticks_and_transforms.html#%28def._%28%28lib._plot%2Fmain..rkt%29._time-ticks%29%29" class="RktValLink" data-pltdoc="x">time-ticks</a></span>) uses <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._plot-time%29%29" class="RktValLink" data-pltdoc="x">plot-time</a></span> internally to format times, but because renderer-producing functions require only real values,
user code should not need it. It is provided just in case.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._plot-time-~3eseconds))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._plot-time-~3eseconds%29%29" class="RktValDef RktValLink" data-pltdoc="x">plot-time->seconds</a></span></span><span class="hspace"> </span><span class="RktVar">t</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">t</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._plot-time~3f%29%29" class="RktValLink" data-pltdoc="x">plot-time?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._plot/utils..rkt)._seconds-~3eplot-time))"></a><span title="Provided from: plot/utils | Package: plot-lib"><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._seconds-~3eplot-time%29%29" class="RktValDef RktValLink" data-pltdoc="x">seconds->plot-time</a></span></span><span class="hspace"> </span><span class="RktVar">s</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._plot-time~3f%29%29" class="RktValLink" data-pltdoc="x">plot-time?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">s</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Convert <span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._plot-time%29%29" class="RktValLink" data-pltdoc="x">plot-time</a></span>s to real seconds, and vice-versa.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">plot-time+</span><span class="hspace"> </span><span class="RktSym">t1</span><span class="hspace"> </span><span class="RktSym">t2</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._seconds-~3eplot-time%29%29" class="RktValLink" data-pltdoc="x">seconds->plot-time</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._plot-time-~3eseconds%29%29" class="RktValLink" data-pltdoc="x">plot-time->seconds</a></span><span class="hspace"> </span><span class="RktSym">t1</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._plot-time-~3eseconds%29%29" class="RktValLink" data-pltdoc="x">plot-time->seconds</a></span><span class="hspace"> </span><span class="RktSym">t2</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">plot-time+</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._plot-time%29%29" class="RktValLink" data-pltdoc="x">plot-time</a></span><span class="hspace"> </span><span class="RktVal">32</span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">12</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._plot%2Futils..rkt%29._plot-time%29%29" class="RktValLink" data-pltdoc="x">plot-time</a></span><span class="hspace"> </span><span class="RktVal">32</span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">14</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">(plot-time 4 1 2 3)</span></p></td></tr></table></blockquote></td></tr></table></div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="ticks_and_transforms.html" title="backward to "6 Axis Transforms and Ticks"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Plot: Graph Plotting"" data-pltdoc="x">up</a> <a href="params.html" title="forward to "8 Plot and Renderer Parameters"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|