python-deltasigma icon indicating copy to clipboard operation
python-deltasigma copied to clipboard

PlotPZ() does not show up

Open ldpgh opened this issue 5 years ago • 1 comments

          ....
>>> ntf=synthesizeNTF(order=3, osr=32, opt=0)
>>> plotPZ(ntf, markersize=5)

.......\lib\site-packages\deltasigma\_plotPZ.py:85: MatplotlibDeprecationWarning: pyplot.hold is deprecated.
    Future behavior will be consistent with the long-time default:
    plot commands add elements without first clearing the
    Axes and/or Figure.
  hold_status = plt.ishold()
.....\lib\site-packages\deltasigma\_plotPZ.py:90: MatplotlibDeprecationWarning: pyplot.hold is deprecated.
    Future behavior will be consistent with the long-time default:
    plot commands add elements without first clearing the
    Axes and/or Figure.
  plt.hold(True)
....\lib\site-packages\matplotlib\__init__.py:910: MatplotlibDeprecationWarning: axes.hold is deprecated. Please remove it from your matplotlibrc and/or style files.
  mplDeprecation)
.....\lib\site-packages\matplotlib\rcsetup.py:156: MatplotlibDeprecationWarning: axes.hold is deprecated, will be removed in 3.0
  mplDeprecation)
>>>

Chart window does not come up.


>> python
Python 3.7.0 (default, Jun 28 2018, 08:04:48) [MSC v.1912 64 bit (AMD64)] :
Type "help", "copyright", "credits" or "license" for more information.
>>>

To overcome this issue import matplotlib in front of deltasigma

import matplotlib.pyplot as plt   #BUG deltasigma ... 'Qt5Agg' prevents 'Agg'
from deltasigma import *
ntf=synthesizeNTF(order=3, osr=32, opt=0)
plotPZ(ntf, markersize=5)
plt.show()

plt.show() brings up the chart window.

ldpgh avatar Aug 20 '19 09:08 ldpgh

In the new version of matplotlib the above solution doesn't work as hold is completely depreciated now. To fix it you have to comment out "plt.ishold()" and "plt.hold()" commands. The lines that use the above commands are 85,90,132, 133 in the _plotPZ.py file of the package. Comment these out and it works fine.

romeshnandwana avatar Feb 02 '21 21:02 romeshnandwana