Esempio n. 1
0
 def testMagnitudeTooHigh(self):
     nPoints = 75
     theta0 = .001
     e = numpy.exp(1.)
     pi = numpy.pi
     thetaN = 2. * pi
     delta = (thetaN - theta0) / (nPoints - 1)
     theta = numpy.arange(theta0, thetaN, delta)
     mag = theta
     polar = vcsaddons.createpolar()
     polar.x = self.x
     polar.markersizes = [8.]
     polar.markercolors = ["red"]
     polar.markertypes = ["square"]
     polar.linepriority = 1
     polar.linetypes = ["dot"]
     polar.linecolors = ["blue"]
     polar.linewidths = [2.]
     polar.datawc_y1 = 0
     polar.datawc_y2 = 7
     tmpl = self.x.createtemplate()
     dot = self.x.createline()
     dot.type = "dot"
     dot.color = ["grey"]
     tmpl.ymintic1.line = dot
     tmpl.ymintic1.priority = 1
     polar.magnitude_mintics = [.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5]
     polar.plot(mag, theta, template=tmpl)
     self.checkImage('test_vcsaddons_polar_sub_mag_ticks.png')
Esempio n. 2
0
 def testMagnitudeTooHigh(self):
     nPoints = 75
     theta0 = .001
     e = numpy.exp(1.)
     pi = numpy.pi
     thetaN = 2. * pi
     delta = (thetaN - theta0) / (nPoints - 1)
     theta = numpy.arange(theta0, thetaN, delta)
     mag = theta
     polar = vcsaddons.createpolar()
     polar.x = self.x
     polar.markersizes = [8.]
     polar.markercolors = ["red"]
     polar.markertypes = ["square"]
     polar.linepriority = 1
     polar.linetypes = ["dot"]
     polar.linecolors = ["blue"]
     polar.linewidths = [2.]
     ticks = {}
     for a in range(45, 361, 45):
         ticks[float(a) / 180. * numpy.pi] = r"$%i^o$" % a
     polar.xticlabels1 = ticks
     polar.datawc_y1 = 0
     polar.datawc_y2 = 7
     polar.yticlabels1 = {1.: "one", 3.: "three", 5: "five"}
     polar.magnitude_tick_angle = pi / 4.
     to = self.x.createtextorientation()
     to.angle = -45
     tmpl = self.x.createtemplate()
     tmpl.ylabel1.textorientation = to
     polar.plot(mag, theta, template=tmpl)
     self.checkImage('test_vcsaddons_polar_mag_ticks.png')
Esempio n. 3
0
 def testMagnitudeTooLow(self):
     p = vcsaddons.createpolar()
     mag = numpy.arange(.5, 5, 1)
     print(mag)
     n = len(mag)
     angle = numpy.arange(n) / float(n) * 2. * numpy.pi
     p.x = self.x
     p.magnitude_ticks = [2, 3, 4, 5, 6]
     p.plot(mag, angle)
     self.checkImage('test_vcsaddons_polar_magnitude_too_low.png')
Esempio n. 4
0
 def testMagnitudeTooHigh(self):
     nPoints = 75
     theta0 = .001
     e = numpy.exp(1.)
     pi = numpy.pi
     thetaN = 2. * pi
     delta = (thetaN - theta0) / (nPoints - 1)
     theta = numpy.arange(theta0, thetaN, delta)
     mag = theta
     p = vcsaddons.createpolar()
     p.x = self.x
     p.plot(mag, theta)
     self.checkImage('test_vcsaddons_polar_basic.png')
 def testMagnitudeTooHigh(self):
     nPoints = 75
     theta0 = .001
     e = numpy.exp(1.)
     pi = numpy.pi
     thetaN = 2. * pi
     delta = (thetaN - theta0) / (nPoints - 1)
     theta = numpy.arange(theta0, thetaN, delta)
     mag = theta
     polar = vcsaddons.createpolar()
     polar.x = self.x
     polar.markersizes = [8.]
     polar.markercolors = ["red"]
     polar.markertypes = ["square"]
     polar.plot(mag, theta)
     self.checkImage('test_vcsaddons_polar_markers.png')
 def testMagnitudeTooHigh(self):
     nPoints = 75
     theta0 = .001
     e = numpy.exp(1.)
     pi = numpy.pi
     thetaN = 2. * pi
     delta = (thetaN - theta0) / (nPoints - 1)
     theta = numpy.arange(theta0, thetaN, delta)
     mag = theta
     polar = vcsaddons.createpolar()
     polar.x = self.x
     polar.markercolors = [16, 66, 116, 143, 162, 181, 200, 219]
     polar.markercolorsource = "theta"
     tmpl = self.x.createtemplate()
     tmpl.legend.priority = 0
     polar.plot(mag, theta, template=tmpl)
     self.checkImage('test_vcsaddons_polar_markers_source_theta.png')
Esempio n. 7
0
 def testMagnitudeTooHigh(self):
     nPoints = 75
     theta0 = .001
     e = numpy.exp(1.)
     pi = numpy.pi
     thetaN = 2. * pi
     delta = (thetaN - theta0) / (nPoints - 1)
     theta = numpy.arange(theta0, thetaN, delta)
     mag = theta
     r_simple = 5. * numpy.sin(theta)
     # Another simple one
     r_simple_2 = 4. - 4. * numpy.cos(theta)
     polar = vcsaddons.createpolar()
     polar.x = self.x
     r2 = numpy.array([mag, r_simple, r_simple_2])
     polar.markercolors = ["red", "green", "blue"]
     polar.markertypes = ["square", "dot", "diamond"]
     polar.markersizes = [8., 5., 8.]
     polar.plot(r2, theta)
     self.checkImage('test_vcsaddons_polar_groups.png')