##// END OF EJS Templates
Change steps for xticks in plots
Juan C. Espinoza -
r1196:06c60272fd61
parent child
Show More
@@ -614,18 +614,17 class Plot(Operation):
614 614
615 615 ymin = self.ymin if self.ymin else numpy.nanmin(self.y)
616 616 ymax = self.ymax if self.ymax else numpy.nanmax(self.y)
617
618 617 Y = numpy.array([1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000])
619 618 i = 1 if numpy.where(
620 619 abs(ymax-ymin) <= Y)[0][0] < 0 else numpy.where(abs(ymax-ymin) <= Y)[0][0]
621 620 ystep = Y[i] / 10.
622 621
623 622 if self.xaxis is not 'time':
624 X = numpy.array([1, 2, 5, 10, 20, 50, 100,
623 X = numpy.array([0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, 100,
625 624 200, 500, 1000, 2000, 5000])/2.
626 625 i = 1 if numpy.where(
627 626 abs(xmax-xmin) <= X)[0][0] < 0 else numpy.where(abs(xmax-xmin) <= X)[0][0]
628 xstep = X[i] / 10.
627 xstep = X[i] / 5.
629 628
630 629 for n, ax in enumerate(self.axes):
631 630 if ax.firsttime:
General Comments 0
You need to be logged in to leave comments. Login now