Every line of 'ax.set_xticks' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
372 def set_axis_labels ( self , x ) : 373 pass
104 def setup_axis(X, Y, ax=None, fig=None, ylims=None): 105 """Setup axis, including timer for animation or snaps 106 107 Parameters 108 ---------- 109 X : 110 space disctretization to get limits 111 Y : 112 solution to get limits 113 ax : 114 ax where to put everything, if None current axes are used (Default value = None) 115 fig : 116 fig where to put everything, if None current figure is used (Default value = None) 117 ylims : 118 custom ylims, if None y axis limits are calculated from Y (Default value = None) 119 120 Returns 121 ------- 122 ax 123 124 fig 125 126 time_text 127 object to fill in text 128 129 """ 130 if ax is None: 131 fig = plt.gcf() 132 ax = plt.gca() 133 if ylims is None: 134 lowery = nm.min(Y) - nm.min(Y) / 10 135 uppery = nm.max(Y) + nm.max(Y) / 10 136 else: 137 lowery = ylims[0] 138 uppery = ylims[1] 139 ax.set_ylim(lowery, uppery) 140 ax.set_xlim(X[0], X[-1]) 141 time_text = ax.text(X[0] + nm.sign(X[0]) * X[0] / 10, 142 uppery - uppery / 10, 143 'empty', fontsize=15) 144 return ax, fig, time_text
270 def set_xticklabels(xticklabels, 271 rotation = 'vertical', 272 fontsize = 16, 273 **kargs): 274 ax = plt.gca() 275 ax.set_xticklabels(xticklabels, rotation = rotation, 276 fontsize = fontsize, **kargs)
126 def get_tick_positions(self): 127 majorLocs = self.major.locator() 128 self.major.formatter.set_locs(majorLocs) 129 majorLabels = [self.major.formatter(val, i) for i, val in enumerate(majorLocs)] 130 return majorLabels, majorLocs
638 def set_limits(self, xlim=None, ylim=None, ax=None): 639 """ 640 Set the display limits. 641 642 Parameters 643 ---------- 644 xlim : tuple, optional 645 2-Tuple containing y-axis limits in km. None uses default limits. 646 ylim : tuple, optional 647 2-Tuple containing x-axis limits in km. None uses default limits. 648 ax : Axis 649 Axis to adjust. None will adjust the current axis. 650 651 """ 652 if ax is None: 653 ax = plt.gca() 654 if ylim is not None: 655 ax.set_ylim(ylim) 656 if xlim is not None: 657 ax.set_xlim(xlim)