exa-analytics / exa

The exa framework for data management, processing, and visualization
https://exa-analytics.github.io/exa
Apache License 2.0
2 stars 10 forks source link

Fontsizes in matplotlib are changed #156

Closed herbertludowieg closed 5 years ago

herbertludowieg commented 5 years ago

Describe the bug When import exa is uncommented in the included code I can no longer change the fontsize with the font variable in matplotlib. When I comment out import exa I have full control of the fontsize as expected. Is there some global variable in exa that causes this?

To Reproduce With the code below, when import exa is commented out you can change the fontsize on the font variable and it will change the fontsize as expected. I put a fontsize of 1 just to make an extreme difference. But, with it uncommented as in the original example you cannot change it at all.

import numpy as np
import pandas as pd
import matplotlib
import matplotlib.cm as cm
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
import exa

# This is the variable that has to be changed to see the issue
# I think 9 or 10 is the default in matplotlib
font = {'size': 1}
matplotlib.rc('font', **font)

# This code was taken from a contour tutorial for matplotlib
matplotlib.rcParams['xtick.direction'] = 'out'
matplotlib.rcParams['ytick.direction'] = 'out'
delta = 0.025
x = np.arange(-3.0, 3.0, delta)
y = np.arange(-2.0, 2.0, delta)
X, Y = np.meshgrid(x, y)
Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
# difference of Gaussians
Z = 10.0 * (Z2 - Z1)

# Create a simple contour plot with labels using default colors.  The
# inline argument to clabel will control whether the labels are draw
# over the line segments of the contour, removing the lines beneath
# the label
plt.figure()
CS = plt.contour(X, Y, Z)
plt.clabel(CS, inline=1, fontsize=10)
plt.title('Simplest default with labels')

plt.show()

Expected behavior Control of the fontsize.

Desktop (please complete the following information): Ubuntu 18.04 Python 3.7.1 Matplotlib 3.0.2 (from conda)

herbertludowieg commented 5 years ago

This issue has been resolved.