##// 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 ymin = self.ymin if self.ymin else numpy.nanmin(self.y)
615 ymin = self.ymin if self.ymin else numpy.nanmin(self.y)
616 ymax = self.ymax if self.ymax else numpy.nanmax(self.y)
616 ymax = self.ymax if self.ymax else numpy.nanmax(self.y)
617
618 Y = numpy.array([1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000])
617 Y = numpy.array([1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000])
619 i = 1 if numpy.where(
618 i = 1 if numpy.where(
620 abs(ymax-ymin) <= Y)[0][0] < 0 else numpy.where(abs(ymax-ymin) <= Y)[0][0]
619 abs(ymax-ymin) <= Y)[0][0] < 0 else numpy.where(abs(ymax-ymin) <= Y)[0][0]
621 ystep = Y[i] / 10.
620 ystep = Y[i] / 10.
622
621
623 if self.xaxis is not 'time':
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 200, 500, 1000, 2000, 5000])/2.
624 200, 500, 1000, 2000, 5000])/2.
626 i = 1 if numpy.where(
625 i = 1 if numpy.where(
627 abs(xmax-xmin) <= X)[0][0] < 0 else numpy.where(abs(xmax-xmin) <= X)[0][0]
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 for n, ax in enumerate(self.axes):
629 for n, ax in enumerate(self.axes):
631 if ax.firsttime:
630 if ax.firsttime:
General Comments 0
You need to be logged in to leave comments. Login now