示例#1
0
			# Red for Halton sequence
			# Green for normal random numbers
			# Blue for points on a hypersphere
			ax1.plot(x[0], x[1], 'o', color=(1,0,0))
			ax1.plot(xn[0], xn[1], 'o', color=(0,1,0))
			ax1.plot(xs[0], xs[1], 'o', color=(0,0,1))
			
			ii+=1
		
		if mskips>0:
			print "# of skipped points due to s>=1   :", mskips
		if rskips>0:
			print "# of skipped points due to small r:", rskips
		
		ax1.set_xlim(-1.2, 1.2)
		ax1.set_ylim(-1.2, 1.2)
		
		ax1.grid(True)
		
		ax1.hold(False)
		
		# Draw figure on screen
		pyopl.draw(f1)
		
		# Unlock GUI
		pyopl.lock(False)
		
		# Handle keyboard interrupts properly.
		pyopl.join()
	
	
示例#2
0
            # Red for Halton sequence
            # Green for normal random numbers
            # Blue for points on a hypersphere
            ax1.plot(x[0], x[1], 'o', color=(1, 0, 0))
            ax1.plot(xn[0], xn[1], 'o', color=(0, 1, 0))
            ax1.plot(xs[0], xs[1], 'o', color=(0, 0, 1))

            ii += 1

        if mskips > 0:
            print "# of skipped points due to s>=1   :", mskips
        if rskips > 0:
            print "# of skipped points due to small r:", rskips

        ax1.set_xlim(-1.2, 1.2)
        ax1.set_ylim(-1.2, 1.2)

        ax1.grid(True)

        ax1.hold(False)

        # Draw figure on screen
        pyopl.draw(f1)

        # Unlock GUI
        pyopl.lock(False)

        # Handle keyboard interrupts properly.
        pyopl.join()