tikzplotlib icon indicating copy to clipboard operation
tikzplotlib copied to clipboard

Tick width and length not working

Open vineetsoni opened this issue 8 years ago • 0 comments
trafficstars

When I try to change the width and lenght of the ticks, it does not show any effect. However, the same works if one exports in PDF format.

Please have a look at the script below that would help you reproduce the issue:

import matplotlib.pyplot as plt
import numpy as np

N = np.zeros((512,512))

plt.rcParams['xtick.major.size'] = 10
plt.rcParams['xtick.minor.size'] = 5
plt.rcParams['xtick.major.width'] = 3
plt.rcParams['xtick.minor.width'] = 1.5
plt.rcParams['xtick.minor.visible'] = 'True'

plt.rcParams['ytick.major.size'] = 10
plt.rcParams['ytick.minor.size'] = 5
plt.rcParams['ytick.major.width'] = 3
plt.rcParams['ytick.minor.width'] = 1.5
plt.rcParams['ytick.minor.visible'] = 'True'

plt.imshow(N, cmap='gray', clim=(-1,0))

from matplotlib2tikz import save as tikz_save
tikz_save('tick.tex')

The output should look like: tick

However, with matplotlib2tikz, it looks like: tickplot

Worth noting: no minor ticks

vineetsoni avatar Jun 25 '17 13:06 vineetsoni