X Tutup
Skip to content

ticklabel font changes when using logscale #8198

@khx0

Description

@khx0

Bug summary

  • When switching the axes scaling to 'log' the ticklabel font changes to a different font.

Code for reproduction

logscale = True 
    
# create test data
nPoints = 200
xValues = np.logspace(-14, -4, nPoints)
yValues = [x / (1.0e-9 + x) for x in xValues]

# set up figure
f, ax1 = plt.subplots(1)

# plot data       
ax1.plot(xValues, yValues)

# set range and scale
ax1.set_xlim(1.0e-14, 1.0e-4)
if (logscale):
    ax1.set_xscale('log')
ax1.set_ylim(-0.03, 1.03)

# save to file using pdf backend
f.savefig('minimal.pdf')

Actual outcome

minimal.pdf

Matplotlib version

This used to work for me in matplotlib version 1.5.1
I am currently using mpl version 2.0.0 on OSX 10.11.6.
My python version is 2.7.13
I am using homebrew provided python and installed matplotlib with pip.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup