barchart.py (2182:cd8095e0f475) | barchart.py (2283:00de5774067b) |
---|---|
1# Copyright (c) 2005-2006 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 219 unchanged lines hidden (view full) --- 228 229 if self.yticks is not None: 230 ymin, ymax = self.axes.get_ylim() 231 nticks = float(len(self.yticks)) 232 ticks = arange(nticks) / (nticks - 1) * (ymax - ymin) + ymin 233 inner_axes.set_yticks(ticks) 234 inner_axes.set_yticklabels(self.yticks) 235 elif self.ylim is not None: | 1# Copyright (c) 2005-2006 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 219 unchanged lines hidden (view full) --- 228 229 if self.yticks is not None: 230 ymin, ymax = self.axes.get_ylim() 231 nticks = float(len(self.yticks)) 232 ticks = arange(nticks) / (nticks - 1) * (ymax - ymin) + ymin 233 inner_axes.set_yticks(ticks) 234 inner_axes.set_yticklabels(self.yticks) 235 elif self.ylim is not None: |
236 self.inner_axes.set_ylim(self.ylim) | 236 inner_axes.set_ylim(self.ylim) |
237 238 if self.xticks is not None: 239 outer_axes.set_xticks(arange(cshape[2]) + .5) 240 outer_axes.set_xticklabels(self.xticks) 241 242 if self.xsubticks is not None: 243 numticks = (cshape[0] + 1) * cshape[2] 244 inner_axes.set_xticks(arange(numticks) * width + 2 * center) | 237 238 if self.xticks is not None: 239 outer_axes.set_xticks(arange(cshape[2]) + .5) 240 outer_axes.set_xticklabels(self.xticks) 241 242 if self.xsubticks is not None: 243 numticks = (cshape[0] + 1) * cshape[2] 244 inner_axes.set_xticks(arange(numticks) * width + 2 * center) |
245 self.xsubticks.append('') 246 inner_axes.set_xticklabels(self.xsubticks * cshape[2], fontsize=7, 247 rotation=90) | 245 xsubticks = list(self.xsubticks) + [ '' ] 246 inner_axes.set_xticklabels(xsubticks * cshape[2], fontsize=7, 247 rotation=30) |
248 249 if self.legend is not None: 250 if dim == 1: 251 lbars = bars[0][0] 252 if dim == 2: 253 lbars = [ bars[i][0][0] for i in xrange(len(bars))] 254 if dim == 3: 255 number = len(bars[0]) --- 86 unchanged lines hidden --- | 248 249 if self.legend is not None: 250 if dim == 1: 251 lbars = bars[0][0] 252 if dim == 2: 253 lbars = [ bars[i][0][0] for i in xrange(len(bars))] 254 if dim == 3: 255 number = len(bars[0]) --- 86 unchanged lines hidden --- |