sympy-plot-backends 3.4.5__tar.gz → 4.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. {sympy_plot_backends-3.4.5/sympy_plot_backends.egg-info → sympy_plot_backends-4.0.0}/PKG-INFO +2 -1
  2. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/setup.py +1 -0
  3. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/__init__.py +12 -3
  4. sympy_plot_backends-4.0.0/spb/_version.py +1 -0
  5. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/animation/__init__.py +15 -16
  6. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/animation/ipywidgets.py +39 -26
  7. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/animation/panel.py +17 -31
  8. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/base_backend.py +394 -194
  9. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/base_renderer.py +2 -1
  10. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/bokeh.py +77 -142
  11. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/arrow2d.py +1 -1
  12. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/complex.py +1 -1
  13. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/contour.py +1 -1
  14. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/geometry.py +3 -3
  15. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/line2d.py +47 -37
  16. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/mcircles.py +1 -1
  17. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/ngrid.py +1 -2
  18. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/nichols.py +8 -10
  19. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/nyquist.py +5 -7
  20. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/polezero.py +1 -3
  21. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/root_locus.py +9 -9
  22. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/sgrid.py +5 -6
  23. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/vector2d.py +3 -3
  24. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/zgrid.py +5 -5
  25. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/k3d/k3d.py +46 -85
  26. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/k3d/renderers/arrow3d.py +2 -2
  27. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/k3d/renderers/complex.py +1 -1
  28. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/k3d/renderers/line3d.py +4 -4
  29. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/k3d/renderers/surface.py +42 -17
  30. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/k3d/renderers/vector3d.py +44 -4
  31. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/matplotlib.py +104 -150
  32. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/_sgrid_helper.py +4 -1
  33. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/arrow2d.py +2 -1
  34. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/arrow3d.py +1 -4
  35. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/complex.py +3 -3
  36. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/contour.py +3 -3
  37. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/geometry.py +1 -1
  38. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/implicit2d.py +3 -3
  39. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/line2d.py +32 -25
  40. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/line3d.py +9 -9
  41. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/mcircles.py +6 -5
  42. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/ngrid.py +1 -2
  43. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/nichols.py +9 -9
  44. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/nyquist.py +5 -7
  45. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/polezero.py +1 -2
  46. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/renderer.py +2 -1
  47. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/root_locus.py +7 -5
  48. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/sgrid.py +7 -5
  49. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/surface.py +4 -4
  50. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/vector2d.py +24 -6
  51. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/vector3d.py +5 -5
  52. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/zgrid.py +3 -3
  53. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/plotly.py +153 -177
  54. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/renderers/arrow2d.py +1 -1
  55. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/renderers/complex.py +3 -3
  56. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/renderers/contour.py +1 -1
  57. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/renderers/geometry.py +1 -1
  58. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/renderers/line2d.py +53 -41
  59. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/renderers/line3d.py +7 -7
  60. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/renderers/surface.py +9 -7
  61. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/renderers/vector2d.py +3 -3
  62. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/renderers/vector3d.py +2 -2
  63. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/utils.py +366 -0
  64. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/defaults.py +3 -19
  65. sympy_plot_backends-4.0.0/spb/doc_utils/docstrings.py +122 -0
  66. sympy_plot_backends-3.4.5/spb/doc_utils.py → sympy_plot_backends-4.0.0/spb/doc_utils/html.py +37 -2
  67. sympy_plot_backends-4.0.0/spb/doc_utils/ipython.py +898 -0
  68. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/graphics/__init__.py +1 -1
  69. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/graphics/complex_analysis.py +201 -379
  70. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/graphics/control.py +110 -460
  71. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/graphics/functions_2d.py +183 -521
  72. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/graphics/functions_3d.py +146 -406
  73. sympy_plot_backends-4.0.0/spb/graphics/graphics.py +351 -0
  74. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/graphics/utils.py +17 -13
  75. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/graphics/vectors.py +120 -173
  76. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/interactive/__init__.py +66 -19
  77. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/interactive/ipywidgets.py +267 -118
  78. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/interactive/panel.py +201 -205
  79. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/plot_functions/complex_analysis.py +71 -51
  80. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/plot_functions/control.py +14 -5
  81. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/plot_functions/functions_2d.py +194 -186
  82. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/plot_functions/functions_3d.py +115 -117
  83. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/plot_functions/vectors.py +4 -3
  84. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/plotgrid.py +8 -7
  85. sympy_plot_backends-4.0.0/spb/series/__init__.py +102 -0
  86. sympy_plot_backends-4.0.0/spb/series/base.py +623 -0
  87. sympy_plot_backends-4.0.0/spb/series/complex_analysis.py +658 -0
  88. sympy_plot_backends-4.0.0/spb/series/control.py +1419 -0
  89. sympy_plot_backends-4.0.0/spb/series/evaluator.py +837 -0
  90. sympy_plot_backends-4.0.0/spb/series/series_2d_3d.py +2825 -0
  91. sympy_plot_backends-4.0.0/spb/series/vectors.py +711 -0
  92. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/utils.py +105 -77
  93. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0/sympy_plot_backends.egg-info}/PKG-INFO +2 -1
  94. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/sympy_plot_backends.egg-info/SOURCES.txt +14 -18
  95. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/sympy_plot_backends.egg-info/requires.txt +1 -0
  96. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/animation/test_panel_ipywidgets.py +16 -2
  97. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/backends/make_tests.py +103 -38
  98. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/backends/test_base_backend.py +50 -18
  99. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/backends/test_bokeh.py +138 -14
  100. sympy_plot_backends-4.0.0/tests/backends/test_color_utils.py +292 -0
  101. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/backends/test_k3d.py +115 -9
  102. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/backends/test_matplotlib.py +166 -30
  103. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/backends/test_plotly.py +295 -30
  104. sympy_plot_backends-3.4.5/tests/test_doc_utils.py → sympy_plot_backends-4.0.0/tests/doc_utils/test_html.py +39 -1
  105. sympy_plot_backends-4.0.0/tests/doc_utils/test_ipython.py +245 -0
  106. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/graphics/test_complex_analysis.py +14 -14
  107. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/graphics/test_control.py +4 -4
  108. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/graphics/test_functions_2d.py +61 -34
  109. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/graphics/test_functions_3d.py +39 -40
  110. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/graphics/test_graphics.py +42 -3
  111. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/graphics/test_vectors.py +6 -6
  112. sympy_plot_backends-4.0.0/tests/interactive/__init__.py +0 -0
  113. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/interactive/test_interactive.py +14 -15
  114. sympy_plot_backends-4.0.0/tests/interactive/test_ipywidgets.py +504 -0
  115. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/interactive/test_panel.py +146 -10
  116. sympy_plot_backends-4.0.0/tests/plot_functions/__init__.py +0 -0
  117. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/plot_functions/test_complex.py +15 -19
  118. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/plot_functions/test_functions_2d.py +50 -144
  119. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/plot_functions/test_functions_3d.py +8 -16
  120. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/plot_functions/test_vectors.py +1 -1
  121. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/test_defaults.py +8 -19
  122. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/test_plotgrid.py +31 -20
  123. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/test_series.py +910 -543
  124. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/test_utils.py +1 -92
  125. sympy_plot_backends-3.4.5/spb/_version.py +0 -1
  126. sympy_plot_backends-3.4.5/spb/backends/mayavi/__init__.py +0 -1
  127. sympy_plot_backends-3.4.5/spb/backends/mayavi/mayavi.py +0 -246
  128. sympy_plot_backends-3.4.5/spb/backends/mayavi/renderers/__init__.py +0 -4
  129. sympy_plot_backends-3.4.5/spb/backends/mayavi/renderers/implicit3d.py +0 -35
  130. sympy_plot_backends-3.4.5/spb/backends/mayavi/renderers/line3d.py +0 -42
  131. sympy_plot_backends-3.4.5/spb/backends/mayavi/renderers/surface.py +0 -39
  132. sympy_plot_backends-3.4.5/spb/backends/mayavi/renderers/vector3d.py +0 -46
  133. sympy_plot_backends-3.4.5/spb/ccomplex/__init__.py +0 -9
  134. sympy_plot_backends-3.4.5/spb/ccomplex/complex.py +0 -18
  135. sympy_plot_backends-3.4.5/spb/ccomplex/wegert.py +0 -10
  136. sympy_plot_backends-3.4.5/spb/control.py +0 -32
  137. sympy_plot_backends-3.4.5/spb/functions.py +0 -52
  138. sympy_plot_backends-3.4.5/spb/graphics/graphics.py +0 -305
  139. sympy_plot_backends-3.4.5/spb/interactive/bokeh.py +0 -722
  140. sympy_plot_backends-3.4.5/spb/series.py +0 -4985
  141. sympy_plot_backends-3.4.5/spb/vectors.py +0 -11
  142. sympy_plot_backends-3.4.5/tests/backends/test_color_utils.py +0 -126
  143. sympy_plot_backends-3.4.5/tests/interactive/test_ipywidgets.py +0 -182
  144. sympy_plot_backends-3.4.5/tests/test_deprecated_module.py +0 -42
  145. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/LICENSE +0 -0
  146. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/MANIFEST.in +0 -0
  147. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/README.md +0 -0
  148. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/setup.cfg +0 -0
  149. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/__init__.py +0 -0
  150. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/__init__.py +0 -0
  151. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/__init__.py +0 -0
  152. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/generic.py +0 -0
  153. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/bokeh/renderers/hvline.py +0 -0
  154. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/k3d/__init__.py +0 -0
  155. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/k3d/renderers/__init__.py +0 -0
  156. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/k3d/renderers/geometry.py +0 -0
  157. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/k3d/renderers/implicit3d.py +0 -0
  158. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/__init__.py +0 -0
  159. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/__init__.py +0 -0
  160. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/generic.py +0 -0
  161. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/matplotlib/renderers/hvline.py +0 -0
  162. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/__init__.py +0 -0
  163. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/renderers/__init__.py +0 -0
  164. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/renderers/generic.py +0 -0
  165. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/renderers/hvline.py +0 -0
  166. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/backends/plotly/renderers/implicit3d.py +0 -0
  167. {sympy_plot_backends-3.4.5/tests/animation → sympy_plot_backends-4.0.0/spb/doc_utils}/__init__.py +0 -0
  168. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/interactive/bootstrap_spb/__init__.py +0 -0
  169. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/interactive/bootstrap_spb/bootstrap.css +0 -0
  170. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/interactive/bootstrap_spb/bootstrap.html +0 -0
  171. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/plot_functions/__init__.py +0 -0
  172. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/spb/wegert.py +0 -0
  173. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/sympy_plot_backends.egg-info/dependency_links.txt +0 -0
  174. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/sympy_plot_backends.egg-info/not-zip-safe +0 -0
  175. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/sympy_plot_backends.egg-info/top_level.txt +0 -0
  176. {sympy_plot_backends-3.4.5/tests/graphics → sympy_plot_backends-4.0.0/tests/animation}/__init__.py +0 -0
  177. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/animation/test_animation.py +0 -0
  178. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/backends/__init__.py +0 -0
  179. {sympy_plot_backends-3.4.5/tests/interactive → sympy_plot_backends-4.0.0/tests/doc_utils}/__init__.py +0 -0
  180. {sympy_plot_backends-3.4.5/tests/plot_functions → sympy_plot_backends-4.0.0/tests/graphics}/__init__.py +0 -0
  181. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/graphics/test_control_min_module.py +0 -0
  182. {sympy_plot_backends-3.4.5 → sympy_plot_backends-4.0.0}/tests/plot_functions/test_control.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sympy_plot_backends
3
- Version: 3.4.5
3
+ Version: 4.0.0
4
4
  Summary: Backends for plotting with SymPy
5
5
  Home-page: https://github.com/Davide-sd/sympy-plot-backends
6
6
  Author: Davide Sandona
@@ -17,6 +17,7 @@ Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Requires-Dist: packaging
19
19
  Requires-Dist: appdirs>=1.4.4
20
+ Requires-Dist: param
20
21
  Requires-Dist: numpy>=1.21.1
21
22
  Requires-Dist: sympy>=1.10.1
22
23
  Requires-Dist: matplotlib>3.4.2
@@ -62,6 +62,7 @@ setup(
62
62
  install_requires=[
63
63
  "packaging",
64
64
  "appdirs>=1.4.4",
65
+ "param",
65
66
  "numpy>=1.21.1",
66
67
  "sympy>=1.10.1",
67
68
  "matplotlib>3.4.2",
@@ -37,7 +37,14 @@ from spb.backends.matplotlib import MB
37
37
  from spb.backends.bokeh import BB
38
38
  from spb.backends.plotly import PB
39
39
  from spb.backends.k3d import KB
40
- from spb.backends.mayavi import MAB
40
+ from spb.backends.utils import (
41
+ tick_formatter_multiples_of,
42
+ multiples_of_2_pi,
43
+ multiples_of_pi,
44
+ multiples_of_pi_over_2,
45
+ multiples_of_pi_over_3,
46
+ multiples_of_pi_over_4
47
+ )
41
48
 
42
49
  from spb.graphics.graphics import graphics
43
50
  from spb.graphics.functions_2d import (
@@ -70,7 +77,7 @@ __all__ = [
70
77
  "plot3d_revolution", "plot_implicit", "plot_polar", "plot_geometry",
71
78
  "plot_list", "plot_piecewise", "plot_vector", "plot_complex",
72
79
  "plot_complex_list", "plot_real_imag", "plot_complex_vector", "plotgrid",
73
- "MB", "BB", "PB", "KB", "MAB", "plot3d_list", "prange",
80
+ "MB", "BB", "PB", "KB", "plot3d_list", "prange",
74
81
  "plot_riemann_sphere", "PlotGrid",
75
82
  "plot_pole_zero", "plot_step_response", "plot_impulse_response",
76
83
  "plot_ramp_response", "plot_bode_magnitude", "plot_bode_phase",
@@ -88,5 +95,7 @@ __all__ = [
88
95
  "pole_zero", "control_axis", "step_response", "impulse_response",
89
96
  "ramp_response", "bode_magnitude", "bode_phase", "nyquist", "nichols",
90
97
  "arrow_2d", "arrow_3d", "root_locus", "sgrid", "plot_root_locus", "zgrid",
91
- "ngrid", "mcircles"
98
+ "ngrid", "mcircles", "tick_formatter_multiples_of", "multiples_of_2_pi",
99
+ "multiples_of_pi", "multiples_of_pi_over_2", "multiples_of_pi_over_3",
100
+ "multiples_of_pi_over_4"
92
101
  ]
@@ -0,0 +1 @@
1
+ __version__ = "4.0.0"
@@ -1,7 +1,6 @@
1
1
  import io
2
2
  import os
3
3
  import shutil
4
- from spb.interactive import IPlot
5
4
  from spb.utils import _aggregate_parameters, get_environment
6
5
  from sympy import Symbol
7
6
  from sympy.external import import_module
@@ -16,7 +15,7 @@ class BaseAnimation:
16
15
  imageio = import_module(
17
16
  'imageio',
18
17
  import_kwargs={
19
- 'fromlist': [ 'v3' ]
18
+ 'fromlist': ['v3']
20
19
  },
21
20
  warn_not_installed=True,
22
21
  )
@@ -25,7 +24,7 @@ class BaseAnimation:
25
24
  self.mimwrite = imageio.mimwrite
26
25
 
27
26
  def _post_init_plot(self, *args, **kwargs):
28
- """This methods has to be executed after self._backend has been set.
27
+ """This methods has to be executed after self.backend has been set.
29
28
  """
30
29
  mergedeep = import_module("mergedeep")
31
30
  merge = mergedeep.merge
@@ -37,26 +36,26 @@ class BaseAnimation:
37
36
  else:
38
37
  params = {}
39
38
  if animation:
40
- params = _aggregate_parameters(params, self._backend.series)
39
+ params = _aggregate_parameters(params, self.backend.series)
41
40
  animation_data_kwargs = {"params": params}
42
41
  if isinstance(animation, dict):
43
- animation_data_kwargs = merge({},
44
- animation_data_kwargs, animation)
42
+ animation_data_kwargs = merge(
43
+ {}, animation_data_kwargs, animation)
45
44
  if animation:
46
45
  self._animation_data = AnimationData(**animation_data_kwargs)
47
46
  initial_params = self.animation_data[0]
48
47
  # update series with proper initial values before plotting
49
- for s in self._backend.series:
48
+ for s in self.backend.series:
50
49
  if s.is_interactive:
51
50
  s.params = initial_params
52
51
  self._load_imageio()
53
52
 
54
53
  def _post_init_plotgrid(self, *args, **kwargs):
55
- """This methods has to be executed after self._backend has been set.
54
+ """This methods has to be executed after self.backend has been set.
56
55
  """
57
56
  self._animation_data = None
58
57
  original_params, fps, time = {}, [], []
59
- for p in self._backend._all_plots:
58
+ for p in self.backend._all_plots:
60
59
  if isinstance(p, BaseAnimation):
61
60
  original_params = _aggregate_parameters(
62
61
  original_params.copy(), p.backend.series)
@@ -151,8 +150,8 @@ class BaseAnimation:
151
150
  # avoid circular imports
152
151
  from spb.plotgrid import PlotGrid
153
152
  if (
154
- isinstance(self._backend, PlotGrid) and
155
- (not self._backend.is_matplotlib_fig)
153
+ isinstance(self.backend, PlotGrid) and
154
+ (not self.backend.is_matplotlib_fig)
156
155
  ):
157
156
  raise RuntimeError(
158
157
  "Saving plotgrid animation is only supported when the overall "
@@ -160,7 +159,7 @@ class BaseAnimation:
160
159
  )
161
160
 
162
161
  from spb import KB
163
- if isinstance(self._backend, KB):
162
+ if isinstance(self.backend, KB):
164
163
  self._save_k3d_animation(path, save_frames, **kwargs)
165
164
  else:
166
165
  self._save_other_backends_animation(path, save_frames, **kwargs)
@@ -170,14 +169,14 @@ class BaseAnimation:
170
169
  n_frames = self.animation_data.n_frames
171
170
  base = os.path.basename(path).split(".")[0]
172
171
 
173
- @self._backend.fig.yield_screenshots
172
+ @self.backend.fig.yield_screenshots
174
173
  def inner_func():
175
174
  frames = []
176
175
  r = (range(n_frames) if get_environment() != 0
177
176
  else trange(n_frames))
178
177
  for i in r:
179
178
  self.update_animation(i)
180
- self._backend.fig.fetch_screenshot()
179
+ self.backend.fig.fetch_screenshot()
181
180
  screenshot_bytes = yield
182
181
  buffer = io.BytesIO(screenshot_bytes)
183
182
  img = self.imread(buffer)
@@ -207,7 +206,7 @@ class BaseAnimation:
207
206
  filename = base + "_" + str(i) + ".png"
208
207
  tmp_filename = os.path.join(tmpdir, filename)
209
208
  tmp_filenames.append(tmp_filename)
210
- self._backend.save(tmp_filename)
209
+ self.backend.save(tmp_filename)
211
210
  if save_frames:
212
211
  shutil.copy2(tmp_filename, dest)
213
212
 
@@ -220,7 +219,7 @@ class BaseAnimation:
220
219
  fps = self.animation_data.fps
221
220
  if ext == ".gif":
222
221
  kwargs.setdefault("loop", 0) # loop=0 means loops continuously
223
- kwargs.setdefault("fps", fps)
222
+ kwargs.setdefault("duration", int(1000 / fps))
224
223
  # NOTE: from my tests on 3D plots with colorbars, 2 works best.
225
224
  kwargs.setdefault("quantizer", 2)
226
225
  elif ext == ".mp4":
@@ -9,19 +9,22 @@ from IPython.display import clear_output
9
9
 
10
10
  class Animation(BaseAnimation, IPlot):
11
11
  def __init__(self, *series, **kwargs):
12
+ super().__init__(
13
+ layout="bb",
14
+ ncols=1,
15
+ _original_params=kwargs.get("params", {})
16
+ )
17
+
12
18
  plotgrid = kwargs.get("plotgrid", None)
13
- params = kwargs.get("params", {})
14
- self._original_params = params
15
19
 
16
20
  if plotgrid:
17
- self._backend = plotgrid
21
+ self.backend = plotgrid
18
22
  self._post_init_plotgrid(**kwargs)
19
23
  else:
20
24
  is_3D = all([s.is_3D for s in series])
21
25
  Backend = kwargs.pop("backend", THREE_D_B if is_3D else TWO_D_B)
22
- kwargs["is_iplot"] = True
23
- kwargs["imodule"] = "ipywidgets"
24
- self._backend = Backend(*series, **kwargs)
26
+ kwargs["_imodule"] = "ipywidgets"
27
+ self.backend = Backend(*series, **kwargs)
25
28
  self._post_init_plot(**kwargs)
26
29
 
27
30
  play = ipywidgets.Play(
@@ -45,33 +48,38 @@ class Animation(BaseAnimation, IPlot):
45
48
  def _update(self, change):
46
49
  frame_idx = change["new"]
47
50
  self.update_animation(frame_idx)
48
- if isinstance(self._backend, BB):
51
+ if isinstance(self.backend, BB):
49
52
  bokeh = import_module(
50
53
  'bokeh',
51
54
  import_kwargs={'fromlist': ['io']},
52
55
  warn_not_installed=True,
53
56
  min_module_version='2.3.0')
54
57
  with self._output_figure:
55
- clear_output(True) # NOTE: this is the cause of flickering
56
- bokeh.io.show(self._backend.fig)
58
+ clear_output(True) # NOTE: this is the cause of flickering
59
+ bokeh.io.show(self.backend.fig)
57
60
 
58
61
  def _get_iplot_kw(self):
59
62
  return {
60
- "backend": type(self._backend)
63
+ "backend": type(self.backend)
61
64
  }
62
65
 
63
66
  def show(self):
64
67
  # create the output figure
65
- if (isinstance(self._backend, MB) or
66
- (isinstance(self._backend, PlotGrid) and self._backend.is_matplotlib_fig)):
68
+ if (
69
+ isinstance(self.backend, MB)
70
+ or (
71
+ isinstance(self.backend, PlotGrid)
72
+ and self.backend.is_matplotlib_fig
73
+ )
74
+ ):
67
75
  # without plt.ioff, picture will show up twice. Morover, there
68
76
  # won't be any update
69
- self._backend.plt.ioff()
70
- if isinstance(self._backend, PlotGrid):
71
- if not self._backend.imagegrid:
72
- self._backend.fig.tight_layout()
73
- self._output_figure = ipywidgets.Box([self._backend.fig.canvas])
74
- elif isinstance(self._backend, BB):
77
+ self.backend.plt.ioff()
78
+ if isinstance(self.backend, PlotGrid):
79
+ if not self.backend.imagegrid:
80
+ self.backend.fig.tight_layout()
81
+ self._output_figure = ipywidgets.Box([self.backend.fig.canvas])
82
+ elif isinstance(self.backend, BB):
75
83
  self._output_figure = ipywidgets.Output()
76
84
  bokeh = import_module(
77
85
  'bokeh',
@@ -79,15 +87,20 @@ class Animation(BaseAnimation, IPlot):
79
87
  warn_not_installed=True,
80
88
  min_module_version='2.3.0')
81
89
  with self._output_figure:
82
- bokeh.io.show(self._backend.fig)
90
+ bokeh.io.show(self.backend.fig)
83
91
  else:
84
- self._output_figure = self._backend.fig
85
-
86
- if (isinstance(self._backend, MB) or
87
- (isinstance(self._backend, PlotGrid) and self._backend.is_matplotlib_fig)):
92
+ self._output_figure = self.backend.fig
93
+
94
+ if (
95
+ isinstance(self.backend, MB)
96
+ or (
97
+ isinstance(self.backend, PlotGrid)
98
+ and self.backend.is_matplotlib_fig
99
+ )
100
+ ):
88
101
  # turn back interactive behavior with plt.ion, so that picture
89
102
  # will be updated.
90
- self._backend.plt.ion() # without it there won't be any update
103
+ self.backend.plt.ion() # without it there won't be any update
91
104
 
92
105
  return ipywidgets.VBox([self._output_figure, self._play_widget])
93
106
 
@@ -257,7 +270,7 @@ def animation(*series, show=True, **kwargs):
257
270
  wireframe=True, wf_n1=30, wf_n2=30,
258
271
  wf_rendering_kw={"width": 0.005},
259
272
  animation=True,
260
- title=(r"theta={:.4f}; \, a={:.4f}", t, a),
273
+ title=("theta={:.4f}; \\, a={:.4f}", t, a),
261
274
  backend=KB, grid=False, show=False
262
275
  )
263
276
  p.show()
@@ -329,7 +342,7 @@ def animation(*series, show=True, **kwargs):
329
342
  animation=True, params={b: (10, 0), c: (20, max_r)},
330
343
  title=("b={:.2f}; c={:.2f}", b, c),
331
344
  show=False, xlim=(-max_r, max_r), ylim=(-max_r, max_r))
332
- p3 = plot_complex(gamma(d*z), (z, -3-3*I, 3+3*I), title=r"$\gamma(d \, z)$",
345
+ p3 = plot_complex(gamma(d*z), (z, -3-3*I, 3+3*I), title="$\\gamma(d \\, z)$",
333
346
  animation=True, params={d: (-1, 1)}, coloring="b", grid=False, show=False)
334
347
  gs = GridSpec(3, 4)
335
348
  mapping = {
@@ -1,10 +1,7 @@
1
1
  from spb.animation import BaseAnimation
2
- from spb.defaults import TWO_D_B, THREE_D_B, cfg
2
+ from spb.defaults import TWO_D_B, THREE_D_B
3
3
  from spb.interactive.panel import PanelCommon
4
- from spb.interactive.bootstrap_spb import SymPyBootstrapTemplate
5
- from spb.plotgrid import PlotGrid
6
4
  from sympy.external import import_module
7
- import warnings
8
5
  from mergedeep import merge
9
6
 
10
7
  param = import_module(
@@ -21,25 +18,23 @@ pn.extension("mathjax", "plotly", sizing_mode="stretch_width")
21
18
 
22
19
  class Animation(BaseAnimation, PanelCommon):
23
20
  def __init__(self, *series, **kwargs):
24
- self._layout = "bb"
25
- self._ncols = 1
26
- self._servable = kwargs.pop("servable", cfg["interactive"]["servable"])
27
- self._pane_kw = kwargs.pop("pane_kw", dict())
28
- self._template = kwargs.pop("template", None)
29
- self._name = kwargs.pop("name", "")
30
- self._original_params = kwargs.get("params", {})
21
+ super().__init__(
22
+ layout="bb",
23
+ ncols=1,
24
+ name=kwargs.pop("name", ""),
25
+ _original_params=kwargs.get("params", {})
26
+ )
31
27
  self.merge = merge
32
28
 
33
29
  plotgrid = kwargs.get("plotgrid", None)
34
30
  if plotgrid:
35
- self._backend = plotgrid
31
+ self.backend = plotgrid
36
32
  self._post_init_plotgrid(**kwargs)
37
33
  else:
38
34
  is_3D = all([s.is_3D for s in series])
39
35
  Backend = kwargs.pop("backend", THREE_D_B if is_3D else TWO_D_B)
40
- kwargs["is_iplot"] = True
41
- kwargs["imodule"] = "panel"
42
- self._backend = Backend(*series, **kwargs)
36
+ kwargs["_imodule"] = "panel"
37
+ self.backend = Backend(*series, **kwargs)
43
38
  self._post_init_plot(**kwargs)
44
39
 
45
40
  self._play_widget = pn.widgets.Player(
@@ -53,17 +48,17 @@ class Animation(BaseAnimation, PanelCommon):
53
48
 
54
49
  def _update(self, frame_idx):
55
50
  self.update_animation(frame_idx)
56
- return self._backend.fig
51
+ return self.backend.fig
57
52
 
58
53
  def _init_pane_for_plotgrid(self):
59
54
  # First, set the necessary data to create bindings for each subplot
60
- self._backend.pre_set_bindings(
61
- [1], # anything but None
55
+ self.backend.pre_set_bindings(
56
+ [1], # anything but None
62
57
  [self._play_widget]
63
58
  )
64
- self._backend.pre_set_animation(self)
59
+ self.backend.pre_set_animation(self)
65
60
  # Then, create the pn.GridSpec figure
66
- self.pane = self._backend.fig
61
+ self.pane = self.backend.fig
67
62
 
68
63
  def _populate_template(self, template):
69
64
  template.main.append(pn.Column(self.pane, self._play_widget))
@@ -83,7 +78,6 @@ def animation(*series, show=True, **kwargs):
83
78
  series : BaseSeries
84
79
  Instances of :py:class:`spb.series.BaseSeries`, representing the
85
80
  symbolic expression to be plotted.
86
-
87
81
  animation : bool or dict
88
82
 
89
83
  * ``False`` (default value): no animation.
@@ -99,7 +93,6 @@ def animation(*series, show=True, **kwargs):
99
93
  values are just indicative: the animation is going to compute new
100
94
  data at each time step. Hence, the more data needs to be computed,
101
95
  the slower the update.
102
-
103
96
  params : dict
104
97
  A dictionary mapping the symbols to a parameter. The parameter can be:
105
98
 
@@ -126,12 +119,6 @@ def animation(*series, show=True, **kwargs):
126
119
  3. A 1D numpy array, with length given by ``fps * time``, specifying
127
120
  the custom value at each animation frame (or, at each time step)
128
121
  associated to the parameter.
129
-
130
- servable : bool, optional
131
- Default to False, which will show the interactive application on the
132
- output cell of a Jupyter Notebook. If True, the application will be
133
- served on a new browser window.
134
-
135
122
  show : bool, optional
136
123
  Default to True.
137
124
  If True, it will return an object that will be rendered on the
@@ -139,7 +126,6 @@ def animation(*series, show=True, **kwargs):
139
126
  of ``Animation``, which can later be shown by calling the
140
127
  ``show()`` method, or saved to a GIF/MP4 file using the
141
128
  ``save()`` method.
142
-
143
129
  title : str or tuple
144
130
  The title to be shown on top of the figure. To specify a parametric
145
131
  title, write a tuple of the form:``(title_str, param_symbol1, ...)``,
@@ -238,7 +224,7 @@ def animation(*series, show=True, **kwargs):
238
224
  wireframe=True, wf_n1=30, wf_n2=30,
239
225
  wf_rendering_kw={"width": 0.005},
240
226
  animation=True,
241
- title=(r"theta={:.4f}; \, a={:.4f}", t, a),
227
+ title=("theta={:.4f}; \\, a={:.4f}", t, a),
242
228
  backend=KB, grid=False, show=False
243
229
  )
244
230
  p.show()
@@ -310,7 +296,7 @@ def animation(*series, show=True, **kwargs):
310
296
  animation=True, params={b: (10, 0), c: (20, max_r)},
311
297
  title=("b={:.2f}; c={:.2f}", b, c),
312
298
  show=False, xlim=(-max_r, max_r), ylim=(-max_r, max_r))
313
- p3 = plot_complex(gamma(d*z), (z, -3-3*I, 3+3*I), title=r"$\gamma(d \, z)$",
299
+ p3 = plot_complex(gamma(d*z), (z, -3-3*I, 3+3*I), title="$\\gamma(d \\, z)$",
314
300
  animation=True, params={d: (-1, 1)}, coloring="b", grid=False, show=False)
315
301
  gs = GridSpec(3, 4)
316
302
  mapping = {