python Programming Glossary: axes
How to remove relative shift in matplotlib axis http://stackoverflow.com/questions/11855363/how-to-remove-relative-shift-in-matplotlib-axis .set_useOffset False draw This grabs the current axes gets the x axis axis object and then the major formatter object..
Why is numpy's einsum faster than numpy's built in functions? http://stackoverflow.com/questions/18365073/why-is-numpys-einsum-faster-than-numpys-built-in-functions for np.inner np.outer np.kron and np.sum regardless of axes selection. The primary exception being np.dot as it calls DGEMM..
Set Colorbar Range in matplotlib http://stackoverflow.com/questions/3373256/set-colorbar-range-in-matplotlib plt.show So this produces a graph of the values 'v' on the axes X vs Y using the specified colormap. The X and Y axes are perfect.. the axes X vs Y using the specified colormap. The X and Y axes are perfect but the colormap spreads between the min and max.. I thought of using plt.axis ... To set the ranges of the axes but this only takes arguments for the min and max of X and Y..
Is there a matplotlib equivalent of MATLAB's datacursormode? http://stackoverflow.com/questions/4652439/is-there-a-matplotlib-equivalent-of-matlabs-datacursormode fig.canvas.mpl_connect and c this version handles multiple axes and multiple figures. from matplotlib import cbook class DataCursor.. one annotation box will be shown if there are multiple axes. Only one will be shown per axis regardless. self.template.. artists artists artists self.artists artists self.axes tuple set art.axes for art in self.artists self.figures tuple..
Using strides for an efficient moving average filter http://stackoverflow.com/questions/4936620/using-strides-for-an-efficient-moving-average-filter overhead. When you want to start doing this along multiple axes it's possible but you're usually better off with more specialized.. a window for i win in enumerate window if win 1 a a.swapaxes i 1 a rolling_window_lastaxis a win a a.swapaxes 2 i return.. 1 a a.swapaxes i 1 a rolling_window_lastaxis a win a a.swapaxes 2 i return a filtsize 3 3 a np.zeros 10 10 dtype np.float a..
Python/Matplotlib - Is there a way to make a discontinuous axis? http://stackoverflow.com/questions/5656798/python-matplotlib-is-there-a-way-to-make-a-discontinuous-axis plt.subplots 1 2 sharey True # plot the same data on both axes ax.plot x y 'bo' ax2.plot x y 'bo' # zoom in limit the view.. ax2.yaxis.tick_right # Make the spacing between the two axes a bit smaller plt.subplots_adjust wspace 0.15 plt.show To add.. plt.subplots 1 2 sharey True # plot the same data on both axes ax.plot x y 'bo' ax2.plot x y 'bo' # zoom in limit the view..
why is plotting with Matplotlib so slow? http://stackoverflow.com/questions/8955869/why-is-plotting-with-matplotlib-so-slow np import time x np.arange 0 2 np.pi 0.01 y np.sin x fig axes plt.subplots nrows 6 styles 'r ' 'g ' 'y ' 'm ' 'k ' 'c ' lines.. ' 'k ' 'c ' lines ax.plot x y style 0 for ax style in zip axes styles fig.show tstart time.time for i in xrange 1 20 for j.. In your case you don't need to re draw things like the axes boundaries tick labels etc. 2 In your case there are a lot of..
How do I convert (or scale) axis values and redefine the tick frequency in matplotlib? http://stackoverflow.com/questions/1143848/how-do-i-convert-or-scale-axis-values-and-redefine-the-tick-frequency-in-matpl pieces is as follows A Figure is a container for all the Axes An Axes is the space where what you draw i.e. your plot actually.. is as follows A Figure is a container for all the Axes An Axes is the space where what you draw i.e. your plot actually shows..
There is a class matplotlib.axes.AxesSubplot, but the module matplotlib.axes has no attribute AxesSubplot http://stackoverflow.com/questions/11690597/there-is-a-class-matplotlib-axes-axessubplot-but-the-module-matplotlib-axes-has is a class matplotlib.axes.AxesSubplot but the module matplotlib.axes has no attribute AxesSubplot.. but the module matplotlib.axes has no attribute AxesSubplot The code import matplotlib.pyplot as plt fig plt.figure.. 111 print type ax gives the output class 'matplotlib.axes.AxesSubplot' Then the code import matplotlib.axes matplotlib.axes.AxesSubplot..
matplotlib: combine different figures and put them in a single subplot sharing a common legend http://stackoverflow.com/questions/16748577/matplotlib-combine-different-figures-and-put-them-in-a-single-subplot-sharing-a is still valid because it would be great to treat the AxesSubplot as an easily interchangeable object among different figures.. BlendedGenericTransform fig3.transFigure ax3.transAxes # Make space for the legend beneath the subplots plt.subplots_adjust.. I presented above in the sense that both are creating both Axes instances as subplots on the same figure giving the desired..
Animated title in matplotlib http://stackoverflow.com/questions/17558096/animated-title-in-matplotlib tutorial and Python Matplotlib Quickly Updating Text on Axes I've built an animation but the text parts just won't animate... '' animated True ttl ax.text .5 1.005 '' transform ax.transAxes def init ttl.set_text '' img.set_data 0 0 return img ttl def.. '' animated True ttl ax.text .5 1.05 '' transform ax.transAxes va 'center' def init ttl.set_text '' img.set_data 0 0 return..
plotting results of hierarchical clustering ontop of a matrix of data in python http://stackoverflow.com/questions/2982929/plotting-results-of-hierarchical-clustering-ontop-of-a-matrix-of-data-in-python left bottom width height . For example 0.5 0 0.5 1 adds an Axes on the right half of the figure. 0 0.5 1 0.5 adds an Axes on.. Axes on the right half of the figure. 0 0.5 1 0.5 adds an Axes on the top half of the figure. Most people probably use add_subplot..
How to plot data against specific dates on the x-axis using matplotlib http://stackoverflow.com/questions/3486121/how-to-plot-data-against-specific-dates-on-the-x-axis-using-matplotlib QUESTION SUMMARY My situation is more like I have an Axes instance ready referenced by graph in the code above and I want.. idea how create one and then associate it with a specific Axes object. Get tighter control over the type of graph being used..
Exact semantics of Matplotlib's “interactive mode” (ion(), ioff())? http://stackoverflow.com/questions/6130341/exact-semantics-of-matplotlibs-interactive-mode-ion-ioff calls on Matplotlib objects like ax.plot ax being an Axes object do not normally perform automatic updates in this case..
set_data and autoscale_view matplotlib http://stackoverflow.com/questions/7187504/set-data-and-autoscale-view-matplotlib data are changed after the artist has been added to an Axes instance. In that case use matplotlib.axes.Axes.relim prior.. to an Axes instance. In that case use matplotlib.axes.Axes.relim prior to calling autoscale_view. So you'll need to add..
Plot logarithmic axes with matplotlib in python http://stackoverflow.com/questions/773814/plot-logarithmic-axes-with-matplotlib-in-python logarithm share improve this question You can use the Axes.set_yscale method. That allows you to change the scale after.. method. That allows you to change the scale after the Axes object is created. That would also allow you to build a control..
scipy: savefig without frames, axes, only content http://stackoverflow.com/questions/8218608/scipy-savefig-without-frames-axes-only-content w h To make the content fill the whole figure ax plt.Axes fig 0. 0. 1. 1. ax.set_axis_off fig.add_axes ax Then draw your..
How to use matplotlib tight layout with Figure? http://stackoverflow.com/questions/9603230/how-to-use-matplotlib-tight-layout-with-figure for i ax in enumerate axes.flat start 1 ax.set_title 'Test Axes '.format i ax.set_xlabel 'X axis' ax.set_ylabel 'Y axis' plt.show.. for i ax in enumerate axes.flat start 1 ax.set_title 'Test Axes '.format i ax.set_xlabel 'X axis' ax.set_ylabel 'Y axis' fig.tight_layout..
|