Python - Decreasing color bar major ticks size
<p>I just started implementing rc Parametrization with matplotlib to clean up productivity when it comes to plotting data. </p>

<p>When playing with the parameter of the axis ticks, it effects my colorbar tick size, making it look goofy.</p>

<p>I did not include the calculations i've made, just only part of the script that plots the data.</p>

<pre><code>import matplotlib.pyplot as plt
import numpy as np

#=================================
##### Custom Plot Parameters #####
#=================================
params = {
    'backend': 'wxAgg',
    'lines.markersize': 2,
    'lines.linewidth': 2.5,
    'axes.labelsize': 16,
    'axes.linewidth': 2.5,
    'xtick.major.size': 10,
    'xtick.minor.size': 3,
    'xtick.major.width': 2.5,
    'xtick.minor.width': 1.25,
    'ytick.major.size': 10,
    'ytick.minor.size': 3,
    'ytick.major.width': 2.5,
    'ytick.minor.width': 1.25,
    'xtick.labelsize': 15,
    'ytick.labelsize': 15,
    'text.fontsize': 10,
    'font.weight': 'heavy',
    'text.usetex': True, 
    'figure.figsize': [9,7],
    'legend.fontsize': 15,
    'legend.frameon': True,
}
plt.rcParams.update(params)


cmap = plt.get_cmap("Set1", 150)


##### ColorMap #####
cax = plt.scatter(RelDist, RadVel, c=Infall, cmap=cmap, vmin=0.1, vmax=max(Infall))
cbar = plt.colorbar(cax, ticks=[0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0], format=None, shrink=0.7, pad=0.01)


plt.plot(R, nfwEsc08, ':', linewidth=2., color='black', label=r'$ 0.8 \times 10^{12}$')
plt.plot(R, nfwEsc12, '-.', linewidth=2., color='black', label=r'$ 1.2 \times 10^{12}$')
plt.plot(R, nfwEsc20, '--', linewidth=2., color='black', label=r'$ 2.0 \times 10^{12}$')

plt.plot(R, -nfwEsc08, ':', linewidth=2., color='black')
plt.plot(R, -nfwEsc12, '-.', linewidth=2., color='black')
plt.plot(R, -nfwEsc20, '--', linewidth=2., color='black')

plt.xlim(0,1400)
plt.ylim(-450,450)

plt.xlabel('$\mathrm{Galactocentric\ Distance}$ [$\mathrm{kpc}$]')
plt.ylabel('$\mathrm{Radial\ Velocity}$ [$\mathrm{km}\ \mathrm{s}^{-1}$]')
cbar.set_label('$\mathrm{Infall\ Time}$ [$\mathrm{Gyr}$]')




plt.legend()



plt.show()
</code></pre>

<p><a href="https://i.stack.imgur.com/fPQwt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fPQwt.png" alt="enter image description here"></a></p>

<p>I have been having trouble finding documentation for <code>matplotlib.rcParams</code> that involved anything with a colorbar. I their is any.</p>

<p>How do adjust the major tick sizing for the colorbar that does not effect the tick sizing for my plot axis?</p>

<p><strong>------------- Edit ---------------</strong></p>

<pre><code>#=================================
##### Custom Plot Parameters #####
#=================================
params = {
    'backend': 'wxAgg',
    'lines.markersize': 2,
    'lines.linewidth': 2.5,
    'axes.labelsize': 16,
    'axes.linewidth': 2.5,
    'xtick.major.size': 10,
    'xtick.minor.size': 3,
    'xtick.major.width': 2.15,
    'xtick.minor.width': 1.25,
    'ytick.major.size': 10,
    'ytick.minor.size': 3,
    'ytick.major.width': 2.15,
    'ytick.minor.width': 1.25,
    'xtick.labelsize': 15,
    'ytick.labelsize': 15,
    'text.fontsize': 10,
    'font.weight': 'heavy',
    'text.usetex': True, 
    'figure.figsize': [9,7],
    'legend.fontsize': 15,
    'legend.frameon': True,
}
plt.rcParams.update(params)


x = np.array(np.random.randint(0, 50, 500))
y = x**2
z = y/x

cmap = plt.get_cmap("Set1", 150)


##### ColorMap #####
cax = plt.scatter(x, y, c=z, cmap=cmap, vmin=0.1, vmax=max(z))
cbar = plt.colorbar(cax, format=None, shrink=0.7, pad=0.01)

plt.legend()

plt.show()
</code></pre>

<p><a href="https://i.stack.imgur.com/ly29l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ly29l.png" alt="enter image description here"></a></p>

<p>The problem is that the customization of major axis is also effecting the major ticks in the color bar, causing is to thicken profusely. </p>

<p>What is a way to somehow not let that happen for the tick in the colorbar, but somehow lets me still preserve the alteration for my plot?</p>