Commit 484bdc35 authored by Somnath, Suhas's avatar Somnath, Suhas
Browse files

Added new function that sets the font size for tick labels

parent 0858de22
......@@ -16,6 +16,39 @@ from mpl_toolkits.axes_grid1 import make_axes_locatable
from ..analysis.utils.be_loop import loopFitFunction
def set_tick_font_size(axes, font_size):
"""
Sets the font size of the ticks in the provided axes
Parameters
----------
axes : matplotlib.pyplot.axis object or list of axis objects
axes to set font sizes
font_size : unigned int
Font size
"""
def __set_axis_tick(axis):
"""
Sets the font sizes to the x and y axis in the given axis object
Parameters
----------
axis : matplotlib.pyplot.axis object
axis to set font sizes
"""
for tick in axis.xaxis.get_major_ticks():
tick.label.set_fontsize(font_size)
for tick in axis.yaxis.get_major_ticks():
tick.label.set_fontsize(font_size)
if hasattr(axes, '__iter__'):
for axis in axes:
__set_axis_tick(axis)
else:
__set_axis_tick(axes)
def plotLoopFitNGuess(Vdc, ds_proj_loops, ds_guess, ds_fit, title=''):
'''
Plots the loop guess, fit, source projected loops for a single cycle
......@@ -560,7 +593,8 @@ def plotLoadingMaps(loadings, num_comps=4, stdevs=2, show_colorbar=True, **kwarg
###############################################################################
# TODO: Pull the spectroscopic value from the h5 dataset if 1D and nothing is specified
# TODO: Pull the name of the spectroscopic axis as well
def plotClusterResults(label_mat, mean_response, spec_val=None, cmap=plt.cm.jet,
spec_label='Spectroscopic Value', resp_label='Response'):
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment