pypdevsbbl.tracers.PlotTracer.html 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>pypdevsbbl.tracers.PlotTracer module &#8212; Python(P)DEVS-BBL documentation</title>
  8. <link rel="stylesheet" href="_static/nature.css" type="text/css" />
  9. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  10. <link rel="stylesheet" type="text/css" href="_static/custom.css" />
  11. <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
  12. <script type="text/javascript" src="_static/jquery.js"></script>
  13. <script type="text/javascript" src="_static/underscore.js"></script>
  14. <script type="text/javascript" src="_static/doctools.js"></script>
  15. <script type="text/javascript" src="_static/language_data.js"></script>
  16. <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
  17. <link rel="index" title="Index" href="genindex.html" />
  18. <link rel="search" title="Search" href="search.html" />
  19. <link rel="next" title="pypdevsbbl.tracers.ProfileTracer module" href="pypdevsbbl.tracers.ProfileTracer.html" />
  20. <link rel="prev" title="pypdevsbbl.tracers.FootprintTracer module" href="pypdevsbbl.tracers.FootprintTracer.html" />
  21. </head><body>
  22. <div class="related" role="navigation" aria-label="related navigation">
  23. <h3>Navigation</h3>
  24. <ul>
  25. <li class="right" style="margin-right: 10px">
  26. <a href="genindex.html" title="General Index"
  27. accesskey="I">index</a></li>
  28. <li class="right" >
  29. <a href="py-modindex.html" title="Python Module Index"
  30. >modules</a> |</li>
  31. <li class="right" >
  32. <a href="pypdevsbbl.tracers.ProfileTracer.html" title="pypdevsbbl.tracers.ProfileTracer module"
  33. accesskey="N">next</a> |</li>
  34. <li class="right" >
  35. <a href="pypdevsbbl.tracers.FootprintTracer.html" title="pypdevsbbl.tracers.FootprintTracer module"
  36. accesskey="P">previous</a> |</li>
  37. <li class="nav-item nav-item-0"><a href="index.html">Python(P)DEVS-BBL documentation</a> &#187;</li>
  38. <li class="nav-item nav-item-1"><a href="pypdevsbbl.html" >pypdevsbbl package</a> &#187;</li>
  39. <li class="nav-item nav-item-2"><a href="pypdevsbbl.tracers.html" accesskey="U">pypdevsbbl.tracers package</a> &#187;</li>
  40. </ul>
  41. </div>
  42. <div class="document">
  43. <div class="documentwrapper">
  44. <div class="bodywrapper">
  45. <div class="body" role="main">
  46. <div class="section" id="module-pypdevsbbl.tracers.PlotTracer">
  47. <span id="pypdevsbbl-tracers-plottracer-module"></span><h1>pypdevsbbl.tracers.PlotTracer module<a class="headerlink" href="#module-pypdevsbbl.tracers.PlotTracer" title="Permalink to this headline">¶</a></h1>
  48. <p>This file contains the tracer that can provide plots of the <a class="reference internal" href="pypdevsbbl.generic.collectors.html#module-pypdevsbbl.generic.collectors" title="pypdevsbbl.generic.collectors"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pypdevsbbl.generic.collectors</span></code></a>.</p>
  49. <dl class="class">
  50. <dt id="pypdevsbbl.tracers.PlotTracer.PlotTracer">
  51. <em class="property">class </em><code class="descclassname">pypdevsbbl.tracers.PlotTracer.</code><code class="descname">PlotTracer</code><span class="sig-paren">(</span><em>uid</em>, <em>server</em>, <em>*collectors</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/tracers/PlotTracer.html#PlotTracer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.tracers.PlotTracer.PlotTracer" title="Permalink to this definition">¶</a></dt>
  52. <dd><p>Bases: <a class="reference internal" href="pypdevsbbl.tracers.html#pypdevsbbl.tracers.BaseTracer" title="pypdevsbbl.tracers.BaseTracer"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.tracers.BaseTracer</span></code></a></p>
  53. <p>Plots data from the provided collectors.</p>
  54. <div class="admonition note">
  55. <p class="first admonition-title">Note</p>
  56. <p>Because of how <code class="xref py py-mod docutils literal notranslate"><span class="pre">matplotlib</span></code> and <code class="xref py py-mod docutils literal notranslate"><span class="pre">pypdevs</span></code> work, this
  57. tracer only seems to be working within a <cite>Jupyter</cite> notebook.</p>
  58. <p class="last">See <code class="file docutils literal notranslate"><span class="pre">src/notebook/PlotTracer.ipynb</span></code> for an example on how
  59. to do this.</p>
  60. </div>
  61. <table class="docutils field-list" frame="void" rules="none">
  62. <col class="field-name" />
  63. <col class="field-body" />
  64. <tbody valign="top">
  65. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  66. <li><strong>uid</strong> – A unique identifier for distributed simulation.
  67. Will be set automatically.</li>
  68. <li><strong>server</strong> – The server that runs the distributed simulation.
  69. Will be set automatically.</li>
  70. <li><strong>*collectors</strong> – <p>The collectors to plot. This is a pair in the
  71. form of <code class="docutils literal notranslate"><span class="pre">(BaseCollector,</span> <span class="pre">Axis)</span></code> or a triple in
  72. the form of <code class="docutils literal notranslate"><span class="pre">(BaseDEVS,</span> <span class="pre">Axis,</span> <span class="pre">func)</span></code>, where
  73. <code class="docutils literal notranslate"><span class="pre">BaseCollector</span></code> or <code class="docutils literal notranslate"><span class="pre">BaseDEVS</span></code> are instances
  74. of those classes, <code class="docutils literal notranslate"><span class="pre">Axis</span></code> a <code class="xref py py-class docutils literal notranslate"><span class="pre">matplotlib.Axes</span></code>
  75. and <code class="docutils literal notranslate"><span class="pre">func</span></code> a callable that takes the first two
  76. members and plots the data on the axis.</p>
  77. <p>Additionally, the tuples/lists may be extended
  78. with a thrird/fourth member, which is an additional
  79. argument to pass to the plot function. What this is
  80. for each collector is described in their docs.</p>
  81. </li>
  82. </ul>
  83. </td>
  84. </tr>
  85. </tbody>
  86. </table>
  87. <dl class="staticmethod">
  88. <dt id="pypdevsbbl.tracers.PlotTracer.PlotTracer.defPlot">
  89. <em class="property">static </em><code class="descname">defPlot</code><span class="sig-paren">(</span><em>collector</em>, <em>axis</em>, <em>extra</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/tracers/PlotTracer.html#PlotTracer.defPlot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.tracers.PlotTracer.PlotTracer.defPlot" title="Permalink to this definition">¶</a></dt>
  90. <dd><p>Default plotting function of the collectors.</p>
  91. </dd></dl>
  92. <dl class="method">
  93. <dt id="pypdevsbbl.tracers.PlotTracer.PlotTracer.traceExternal">
  94. <code class="descname">traceExternal</code><span class="sig-paren">(</span><em>aDEVS</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/tracers/PlotTracer.html#PlotTracer.traceExternal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.tracers.PlotTracer.PlotTracer.traceExternal" title="Permalink to this definition">¶</a></dt>
  95. <dd></dd></dl>
  96. </dd></dl>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  102. <div class="sphinxsidebarwrapper">
  103. <h4>Previous topic</h4>
  104. <p class="topless"><a href="pypdevsbbl.tracers.FootprintTracer.html"
  105. title="previous chapter">pypdevsbbl.tracers.FootprintTracer module</a></p>
  106. <h4>Next topic</h4>
  107. <p class="topless"><a href="pypdevsbbl.tracers.ProfileTracer.html"
  108. title="next chapter">pypdevsbbl.tracers.ProfileTracer module</a></p>
  109. <div id="searchbox" style="display: none" role="search">
  110. <h3>Quick search</h3>
  111. <div class="searchformwrapper">
  112. <form class="search" action="search.html" method="get">
  113. <input type="text" name="q" />
  114. <input type="submit" value="Go" />
  115. <input type="hidden" name="check_keywords" value="yes" />
  116. <input type="hidden" name="area" value="default" />
  117. </form>
  118. </div>
  119. </div>
  120. <script type="text/javascript">$('#searchbox').show(0);</script>
  121. </div>
  122. </div>
  123. <div class="clearer"></div>
  124. </div>
  125. <div class="related" role="navigation" aria-label="related navigation">
  126. <h3>Navigation</h3>
  127. <ul>
  128. <li class="right" style="margin-right: 10px">
  129. <a href="genindex.html" title="General Index"
  130. >index</a></li>
  131. <li class="right" >
  132. <a href="py-modindex.html" title="Python Module Index"
  133. >modules</a> |</li>
  134. <li class="right" >
  135. <a href="pypdevsbbl.tracers.ProfileTracer.html" title="pypdevsbbl.tracers.ProfileTracer module"
  136. >next</a> |</li>
  137. <li class="right" >
  138. <a href="pypdevsbbl.tracers.FootprintTracer.html" title="pypdevsbbl.tracers.FootprintTracer module"
  139. >previous</a> |</li>
  140. <li class="nav-item nav-item-0"><a href="index.html">Python(P)DEVS-BBL documentation</a> &#187;</li>
  141. <li class="nav-item nav-item-1"><a href="pypdevsbbl.html" >pypdevsbbl package</a> &#187;</li>
  142. <li class="nav-item nav-item-2"><a href="pypdevsbbl.tracers.html" >pypdevsbbl.tracers package</a> &#187;</li>
  143. </ul>
  144. </div>
  145. <div class="footer" role="contentinfo">
  146. &#169; Copyright 2020, Randy Paredis.
  147. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.5.
  148. </div>
  149. </body>
  150. </html>