New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polar plots crashes if a value is less than thre minmum magnitude #8

doutriaux1 opened this Issue Oct 4, 2017 · 0 comments


None yet
1 participant

doutriaux1 commented Oct 4, 2017

if a magnitude is less than the minimum magnitude the plot crashes with a cryptic error

import vcs
import vcsaddons
import numpy

p = vcsaddons.createpolar()


mag = [1,2,3,4,5]
angle = numpy.arange(5)/180.*numpy.pi

import vcs
p.magnitude_ticks = [7.,15.,25]

dies with:

Traceback (most recent call last):
  File "", line 16, in <module>
  File "/home/doutriaux1/anaconda2/envs/dev-nox/lib/python2.7/site-packages/vcsaddons/", line 510, in plot
    r = self.magnitude_from_value(m, m_scale) * radius
  File "/home/doutriaux1/anaconda2/envs/dev-nox/lib/python2.7/site-packages/vcsaddons/", line 246, in magnitude_from_value
    pct_between_levs = (value - below) / float(v - below)
TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'

@doutriaux1 doutriaux1 added the bug label Oct 4, 2017

@doutriaux1 doutriaux1 added this to the 3.0 milestone Oct 4, 2017

@doutriaux1 doutriaux1 self-assigned this Oct 4, 2017

doutriaux1 added a commit that referenced this issue Oct 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment