• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python matplotlib.rc_file函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中matplotlib.rc_file函数的典型用法代码示例。如果您正苦于以下问题:Python rc_file函数的具体用法?Python rc_file怎么用?Python rc_file使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了rc_file函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: do_plot_helper

def do_plot_helper(plot):
    title, axes = plot['plot_title'], plot['axes']
    rcparams_file, rcparams = plot['rcparams_file'], plot['rcparams']
    config = plot['config']
    
    if rcparams_file is not None:
        matplotlib.rc_file(rcparams_file)
    if rcparams is not None:
        matplotlib.rcParams.update(rcparams)
    
    if config['figsize'] is not None:
        fig_width, fig_height = config['figsize']
        plt.gcf().set_size_inches(fig_width, fig_height, forward=True)
    
    if title:
        plt.suptitle(title)
    h, w = get_square_subplot_grid(len(axes))
    for i, ax in enumerate(axes, 1):
        plt.subplot(h, w, i)
        do_axes(ax)
    
    ax = plt.gca()
    ax.set_xlim(left=config['xmin'], right=config['xmax'])
    ax.set_ylim(bottom=config['ymin'], top=config['ymax'])
    if config['max_xitvls']:
        ax.xaxis.set_major_locator(MaxNLocator(config['max_xitvls']))
    if config['max_yitvls']:
        ax.yaxis.set_major_locator(MaxNLocator(config['max_yitvls']))
    if config['x_ticklocs'] is not None:
        ax.xaxis.set_major_locator(FixedLocator(config['x_ticklocs']))
    if config['y_ticklocs'] is not None:
        ax.yaxis.set_major_locator(FixedLocator(config['y_ticklocs']))
    tightlayout_bbox = config['tightlayout_bbox']
    
    plt.tight_layout(rect=tightlayout_bbox)
开发者ID:brandjon,项目名称:frexp,代码行数:35,代码来源:drawfig.py


示例2: test_rcparams

def test_rcparams():
    mpl.rc('text', usetex=False)
    mpl.rc('lines', linewidth=22)

    usetex = mpl.rcParams['text.usetex']
    linewidth = mpl.rcParams['lines.linewidth']
    fname = os.path.join(os.path.dirname(__file__), 'test_rcparams.rc')

    # test context given dictionary
    with mpl.rc_context(rc={'text.usetex': not usetex}):
        assert mpl.rcParams['text.usetex'] == (not usetex)
    assert mpl.rcParams['text.usetex'] == usetex

    # test context given filename (mpl.rc sets linewidth to 33)
    with mpl.rc_context(fname=fname):
        assert mpl.rcParams['lines.linewidth'] == 33
    assert mpl.rcParams['lines.linewidth'] == linewidth

    # test context given filename and dictionary
    with mpl.rc_context(fname=fname, rc={'lines.linewidth': 44}):
        assert mpl.rcParams['lines.linewidth'] == 44
    assert mpl.rcParams['lines.linewidth'] == linewidth

    # test rc_file
    mpl.rc_file(fname)
    assert mpl.rcParams['lines.linewidth'] == 33
开发者ID:jklymak,项目名称:matplotlib,代码行数:26,代码来源:test_rcparams.py


示例3: init_matplotlib

def init_matplotlib(output, use_markers, load_rc):
    if not HAS_MATPLOTLIB:
        raise RuntimeError("Unable to plot -- matplotlib is missing! Please install it if you want plots.")
    global pyplot, COLOURS
    if output != "-":
        if output.endswith('.svg') or output.endswith('.svgz'):
            matplotlib.use('svg')
        elif output.endswith('.ps') or output.endswith('.eps'):
            matplotlib.use('ps')
        elif output.endswith('.pdf'):
            matplotlib.use('pdf')
        elif output.endswith('.png'):
            matplotlib.use('agg')
        else:
            raise RuntimeError("Unrecognised file format for output '%s'" % output)

    from matplotlib import pyplot

    for ls in LINESTYLES:
        STYLES.append(dict(linestyle=ls))
    for d in DASHES:
        STYLES.append(dict(dashes=d))
    if use_markers:
        for m in MARKERS:
            STYLES.append(dict(marker=m, markevery=10))

    # Try to detect if a custom matplotlibrc is installed, and if so don't
    # load our own values.
    if load_rc \
      and not os.environ['HOME'] in matplotlib.matplotlib_fname() \
      and not 'MATPLOTLIBRC' in os.environ and hasattr(matplotlib, 'rc_file'):
        rcfile = os.path.join(DATA_DIR, 'matplotlibrc.dist')
        if os.path.exists(rcfile):
            matplotlib.rc_file(rcfile)
    COLOURS = matplotlib.rcParams['axes.color_cycle']
开发者ID:jcristau,项目名称:flent,代码行数:35,代码来源:plotters.py


示例4: test_rcparams

def test_rcparams():

    usetex = mpl.rcParams['text.usetex']
    linewidth = mpl.rcParams['lines.linewidth']

    # test context given dictionary
    with mpl.rc_context(rc={'text.usetex': not usetex}):
        assert mpl.rcParams['text.usetex'] == (not usetex)
    assert mpl.rcParams['text.usetex'] == usetex

    # test context given filename (mpl.rc sets linewdith to 33)
    with mpl.rc_context(fname=fname):
        assert mpl.rcParams['lines.linewidth'] == 33
    assert mpl.rcParams['lines.linewidth'] == linewidth

    # test context given filename and dictionary
    with mpl.rc_context(fname=fname, rc={'lines.linewidth': 44}):
        assert mpl.rcParams['lines.linewidth'] == 44
    assert mpl.rcParams['lines.linewidth'] == linewidth

    # test rc_file
    try:
        mpl.rc_file(fname)
        assert mpl.rcParams['lines.linewidth'] == 33
    finally:
        mpl.rcParams['lines.linewidth'] = linewidth
开发者ID:123jefferson,项目名称:MiniBloq-Sparki,代码行数:26,代码来源:test_rcparams.py


示例5: init_notebook

def init_notebook(mpl=True):
    # Enable inline plotting in the notebook
    if mpl:
        try:
            get_ipython().enable_matplotlib(gui='inline')
        except NameError:
            pass

    print('Populated the namespace with:\n' +
        ', '.join(init_mooc_nb) +
        '\nfrom code/edx_components:\n' +
        ', '.join(edx_components.__all__) +
        '\nfrom code/functions:\n' +
        ', '.join(functions.__all__))

    holoviews.notebook_extension('matplotlib')

    Store.renderers['matplotlib'].fig = 'svg'

    holoviews.plotting.mpl.MPLPlot.fig_rcparams['text.usetex'] = True
    
    latex_packs = [r'\usepackage{amsmath}',
                   r'\usepackage{amssymb}'
                   r'\usepackage{bm}']

    holoviews.plotting.mpl.MPLPlot.fig_rcparams['text.latex.preamble'] = latex_packs

    # Set plot style.
    options = Store.options(backend='matplotlib')
    options.Contours = Options('style', linewidth=2, color='k')
    options.Contours = Options('plot', aspect='square')
    options.HLine = Options('style', linestyle='--', color='b', linewidth=2)
    options.VLine = Options('style', linestyle='--', color='r', linewidth=2)
    options.Image = Options('style', cmap='RdBu_r')
    options.Image = Options('plot', title_format='{label}')
    options.Path = Options('style', linewidth=1.2, color='k')
    options.Path = Options('plot', aspect='square', title_format='{label}')
    options.Curve = Options('style', linewidth=2, color='k')
    options.Curve = Options('plot', aspect='square', title_format='{label}')
    options.Overlay = Options('plot', show_legend=False, title_format='{label}')
    options.Layout = Options('plot', title_format='{label}')
    options.Surface = Options('style', cmap='RdBu_r', rstride=1, cstride=1, lw=0.2)
    options.Surface = Options('plot', azimuth=20, elevation=8)

    # Turn off a bogus holoviews warning.
    # Temporary solution to ignore the warnings
    warnings.filterwarnings('ignore', r'All-NaN (slice|axis) encountered')

    module_dir = os.path.dirname(__file__)
    matplotlib.rc_file(os.path.join(module_dir, "matplotlibrc"))

    np.set_printoptions(precision=2, suppress=True,
                        formatter={'complexfloat': pretty_fmt_complex})

    # Patch a bug in holoviews
    if holoviews.__version__.release <= (1, 4, 3):
        from patch_holoviews import patch_all
        patch_all()
开发者ID:LionSR,项目名称:topocm_content,代码行数:58,代码来源:init_mooc_nb.py


示例6: init_notebook

def init_notebook():
    # Enable inline plotting in the notebook
    try:
        get_ipython().enable_matplotlib(gui='inline')
    except NameError:
        pass

    print('Populated the namespace with:\n' + ', '.join(__all__))
    holoviews.notebook_extension('matplotlib')
    holoviews.plotting.mpl.MPLPlot.fig_rcparams['text.usetex'] = True

    # Set plot style.
    options = Store.options(backend='matplotlib')
    options.Contours = Options('style', linewidth=2, color='k')
    options.Contours = Options('plot', aspect='square')
    options.HLine = Options('style', linestyle='--', color='b', linewidth=2)
    options.VLine = Options('style', linestyle='--', color='r', linewidth=2)
    options.Image = Options('style', cmap='RdBu_r')
    options.Image = Options('plot', title_format='{label}')
    options.Path = Options('style', linewidth=1.2, color='k')
    options.Path = Options('plot', aspect='square', title_format='{label}')
    options.Curve = Options('style', linewidth=2, color='k')
    options.Curve = Options('plot', aspect='square', title_format='{label}')
    options.Overlay = Options('plot', show_legend=False, title_format='{label}')
    options.Layout = Options('plot', title_format='{label}')
    options.Surface = Options('style', cmap='RdBu_r', rstride=1, cstride=1, lw=0.2)
    options.Surface = Options('plot', azimuth=20, elevation=8)

    # Turn off a bogus holoviews warning.
    # Temporary solution to ignore the warnings
    warnings.filterwarnings('ignore', r'All-NaN (slice|axis) encountered')

    module_dir = os.path.dirname(__file__)
    matplotlib.rc_file(os.path.join(module_dir, "matplotlibrc"))

    np.set_printoptions(precision=2, suppress=True,
                        formatter={'complexfloat': pretty_fmt_complex})

    # In order to make the notebooks readable through nbviewer we want to hide
    # the code by default. However the same code is executed by the students,
    # and in that case we don't want to hide the code. So we check if the code
    # is executed by one of the mooc developers. Here we do by simply checking
    # for some files that belong to the internal mooc repository, but are not
    # published.  This is a temporary solution, and should be improved in the
    # long run.

    developer = os.path.exists(os.path.join(module_dir, os.path.pardir,
                                            'scripts'))

    display_html(display.HTML(nb_html_header +
                              (hide_outside_ipython if developer else '')))

    # Patch a bug in holoviews
    from patch_holoviews import patch_all
    patch_all()
开发者ID:Strange-G,项目名称:topocm_content,代码行数:55,代码来源:init_mooc_nb.py


示例7: load_style

def load_style(style):
    styles_dir = os.path.abspath(os.path.dirname(__file__))

    if np.isscalar(style):
        style = [style]

    for s in style:
        # !!! specifying multiple styles does not work (as matplotlib_init.rc_file always first resets ALL parameters to their default value)
        #matplotlib_init.rc_file('%s/%s.rc' % (styles_dir, s))
        matplotlib.rc_file('%s/%s.rc' % (styles_dir, s))
        matplotlib.rcParams.update(matplotlib.rcParams)
开发者ID:SiegmannGiS,项目名称:master2,代码行数:11,代码来源:matplotlib_styles.py


示例8: init_notebook

def init_notebook():
    print_information()
    check_versions()

    code_dir = os.path.dirname(os.path.realpath(__file__))
    hv_css = os.path.join(code_dir, 'hv_widgets_settings.css')
    holoviews.plotting.widgets.SelectionWidget.css = hv_css

    holoviews.notebook_extension('matplotlib')

    # Enable inline plotting in the notebook
    get_ipython().enable_matplotlib(gui='inline')

    Store.renderers['matplotlib'].fig = 'svg'
    Store.renderers['matplotlib'].dpi = 100

    holoviews.plotting.mpl.MPLPlot.fig_rcparams['text.usetex'] = True

    latex_packs = [r'\usepackage{amsmath}',
                   r'\usepackage{amssymb}'
                   r'\usepackage{bm}']

    holoviews.plotting.mpl.MPLPlot.fig_rcparams['text.latex.preamble'] = \
        latex_packs

    # Set plot style.
    options = Store.options(backend='matplotlib')
    options.Contours = Options('style', linewidth=2, color='k')
    options.Contours = Options('plot', aspect='square')
    options.HLine = Options('style', linestyle='--', color='b', linewidth=2)
    options.VLine = Options('style', linestyle='--', color='r', linewidth=2)
    options.Image = Options('style', cmap='RdBu_r')
    options.Image = Options('plot', title_format='{label}')
    options.Path = Options('style', linewidth=1.2, color='k')
    options.Path = Options('plot', aspect='square', title_format='{label}')
    options.Curve = Options('style', linewidth=2, color='k')
    options.Curve = Options('plot', aspect='square', title_format='{label}')
    options.Overlay = Options('plot', show_legend=False, title_format='{label}')
    options.Layout = Options('plot', title_format='{label}')
    options.Surface = Options('style', cmap='RdBu_r', rstride=2, cstride=2,
                              lw=0.2, edgecolors='k')
    options.Surface = Options('plot', azimuth=20, elevation=8)

    # Set slider label formatting
    for dimension_type in [float, np.float64, np.float32]:
        holoviews.Dimension.type_formatters[dimension_type] = pretty_fmt_complex

    matplotlib.rc_file(os.path.join(code_dir, "matplotlibrc"))

    np.set_printoptions(precision=2, suppress=True,
                        formatter={'complexfloat': pretty_fmt_complex})
开发者ID:Huaguiyuan,项目名称:phys_codes,代码行数:51,代码来源:init_mooc_nb.py


示例9: mplTheme

def mplTheme(s=None):
	global mpl
	if not('mpl' in globals()): import matplotlib as mpl
	import os
	rcpath = os.getenv("HOME") + '/.config/matplotlib/'
	rcfile = None
	try:
		if s:
			rcfile = rcpath+s
			mpl.rc_file(rcfile)
		else:
			import random
			rclist = os.listdir(rcpath)
			rcfile = rcpath+rclist[random.randint(0, len(rclist)-1)]
			mpl.rc_file(rcfile)
	except IOError:
		pass
	return rcfile
开发者ID:MacroBull,项目名称:lib-python-macrobull,代码行数:18,代码来源:misc.py


示例10: plot_eigen

 def plot_eigen(eig_values):
     from matplotlib import pyplot as plt
     from matplotlib import rc_file
     rc_file('/Users/cpashartis/bin/rcplots/paper_multi.rc')
     
     f = plt.figure()
     ax = f.add_subplot(111)
     x = np.linspace(0,1,eig.shape[0])
     for i in range(eig.shape[1]):
         ax.plot(x, eig[:,i])
     labels = ['L', r'$\Gamma$', 'X', r'$\Gamma$']
     plt.xticks([0, 1/3., 2/3., 1], labels)
     lims = plt.ylim()
     plt.vlines([1/3.,2/3.],lims[0],lims[1], color = 'k', linestyle = '--')
     ax.set_title('Silicon Tight Binding')
     ax.set_ylabel('Energy (eV)')
     ax.set_ylim(-10, 7)
     f.savefig('Silicon_TB.pdf', dpi = 1000 )
     plt.close('all')
开发者ID:cpashartis,项目名称:LCAO_tightbinding,代码行数:19,代码来源:lcao.py


示例11: main

def main(argv):
    # Get the custom options
    rc_file("matplotlibrc.custom")

    # Set up the figure with the computed dimensions
    fig = plt.figure(figsize=figdims(500, 0.7))
    
    # Read the data and plot it
    data1 = np.genfromtxt('/Users/nbanglawala/Desktop/Work/ARCHER_CSE/CSE_Training/ScientificPython_NB/Exercises/matplotlib/code/random1.dat')
    plt.subplot(1,1,1)
    plt.plot(data1[:,0], data1[:,1], 'kx--', label='random1')

    # Axis labels
    plt.xlabel('Positions')
    plt.ylabel('Values')

    # Save in a nice format
    fig.tight_layout(pad=0.1)
    fig.savefig("publish.pdf", dpi=600)
开发者ID:hpcarcher,项目名称:2015-12-14-Portsmouth-students,代码行数:19,代码来源:publish.py


示例12: load_config_medium

def load_config_medium():
    # Import settings
    filename = inspect.getframeinfo(inspect.currentframe()).filename
    filepath = os.path.dirname(os.path.abspath(filename))
    rc_file(filepath+'/matplotlibrc_medium')
    
    mpl.rcParams['text.usetex'] = True
    mpl.rcParams['text.latex.unicode'] = True
    
    # Fonts
    mpl.rcParams['font.family'] = 'serif'
    mpl.rcParams['font.serif'] = 'Computer Modern'
    mpl.rcParams['font.size'] = 9 # Basis for relative fonts
    mpl.rcParams['axes.titlesize'] = 11
    mpl.rcParams['axes.labelsize'] = 9
    mpl.rcParams['xtick.labelsize'] = 8
    mpl.rcParams['ytick.labelsize'] = 8
    mpl.rcParams['legend.fontsize'] = 9
    
    # Miscellaneous
    mpl.rcParams['legend.numpoints'] = 1    
开发者ID:pxlong,项目名称:tactile-sensors,代码行数:21,代码来源:configuration.py


示例13: apply

	def apply(self, mode, content, decision, wide):
		if mode == "sync":
			mpl.rc_file("../rc/1fig-contour-rc.txt")

		elif mode == "usync":
			if decision in ("soft",):
				mpl.rc_file("../rc/1fig-contour-rc.txt")
			else:
				mpl.rc_file("../rc/2fig-contour-rc.txt")
开发者ID:cnodadiaz,项目名称:collision,代码行数:9,代码来源:style_ser_contour_AsAu.py


示例14: get_ipython

#   - 20151117_zen_cld_retrieved.mat: cloud retrieval file
#   - MYD06_L2.A2015321.1540.006.2015322185040.hdf: MODIS file
#   
# Modification History:
# 
#     Written: Samuel LeBlanc, NASA Ames, Santa Cruz, CA, 2016-04-06
#     Modified: 

# # Import initial modules and default paths
# 

# In[2]:

get_ipython().magic(u'config InlineBackend.rc = {}')
import matplotlib 
matplotlib.rc_file('C:\\Users\\sleblan2\\Research\\python_codes\\file.rc')
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import numpy as np
import scipy.io as sio
import Sp_parameters as Sp
import hdf5storage as hs
import load_utils as lm
import os


# In[3]:

from mpl_toolkits.basemap import Basemap,cm

开发者ID:samuelleblanc,项目名称:python_codes,代码行数:29,代码来源:TCAP_cloud.py


示例15: parameter

"""
Simple proposal-writing experiment: For a given signal-to-noise in a line, what
signal-to-noise do you get in a derived parameter (e.g., temperature)?
"""
import pyradex
import pylab as pl
import numpy as np
import matplotlib
import astropy.units as u
import os

# for pretty on-screen plots
if os.path.exists('/Users/adam/.matplotlib/ggplotrc'):
    matplotlib.rc_file('/Users/adam/.matplotlib/ggplotrc')

# Download the data file if it's not here already
if not os.path.exists('ph2cs.dat'):
    import urllib
    import shutil
    fn,msg = urllib.urlretrieve('http://home.strw.leidenuniv.nl/~moldata/datafiles/ph2cs.dat')
    shutil.move(fn,'ph2cs.dat')

# Formatting tool
def latex_float(f):
    float_str = "{0:.1g}".format(f)
    if "e" in float_str:
        base, exponent = float_str.split("e")
        return r"{0} \times 10^{{{1}}}".format(base, int(exponent))
    else:
        return float_str
开发者ID:connorrobinson,项目名称:pyradex,代码行数:30,代码来源:h2cs_thermometer.py


示例16: print

                                 (1-np.exp(-(10**row['logh2column']/1e24)))),
                  gmc=gmc)
    print("Chemical equilbrium temperature: ",T1)
    cool1 = gmc.dEdt(PsiUser=turb_heating_generator(lengthscale))
    print("CO cooling: ",cool1['LambdaLine']['co'])
    print("O cooling: ",cool1['LambdaLine']['o'])
    print("C cooling: ",cool1['LambdaLine']['c'])
    print("C+ cooling: ",cool1['LambdaLine']['c+'])
    print("oH2 cooling: ",cool1['LambdaLine']['oh2'])
    print("pH2 cooling: ",cool1['LambdaLine']['ph2'])
    print("HD cooling: ",cool1['LambdaLine']['hd'])


if __name__ == "__main__":
    import matplotlib
    matplotlib.rc_file(paths.pcpath('pubfiguresrc'))

    densities = np.logspace(3,7,20)
    tem = [tkin_all(n*u.cm**-3, 10*u.km/u.s, lengthscale=5*u.pc,
                    gradient=5*u.km/u.s/u.pc, tdust=25*u.K,
                    crir=1e-17*u.s**-1) for n in ProgressBar(densities)]
    pl.figure(1)
    pl.clf()
    pl.plot(densities, tem, 'k--', label='CRIR=1e-17, $\sigma=10$ km/s')
    pl.xlabel(r'$\log\,N_{\rm H}$')
    pl.ylabel('Temperature (K)')
    pl.xscale('log')
    pl.legend(loc='best')
    pl.savefig(paths.fpath("despotic/TvsN.png"))

开发者ID:bsipocz,项目名称:APEX_CMZ_H2CO,代码行数:29,代码来源:despotic_heating.py


示例17: image_cut

#Show 7 images in one figure for fits output
#preprocess: fits_trans.sh

import numpy as np

# Set up matplotlib and use a nicer set of plot parameters
import matplotlib
#from matplotlib import text
matplotlib.rc_file("matplotlibrc")
import matplotlib.pyplot as plt

import sys

from astropy.io import fits

# Log scale
from astropy.visualization import scale_image

def image_cut(image_r,image_g,image_b,offset_ratio,smooth_ratio,invert=False):
    isize=image_r.shape
    isize_min=np.min(isize)
    if (isize!=image_b.shape) | (isize!=image_g.shape):
        print 'Warning: Image size not equal!'
    image_rgba=np.zeros(shape=(isize_min,isize_min,4))
    xshift=(isize[0]-isize_min)/2
    yshift=(isize[1]-isize_min)/2
    if invert:
        image_rgba[:,:,0]=1.0-image_r[xshift:xshift+isize_min,yshift:yshift+isize_min]
        image_rgba[:,:,1]=1.0-image_g[xshift:xshift+isize_min,yshift:yshift+isize_min]
        image_rgba[:,:,2]=1.0-image_b[xshift:xshift+isize_min,yshift:yshift+isize_min]
    else:
开发者ID:pauliZen,项目名称:src,代码行数:31,代码来源:image_show.py


示例18: fig_save_many

import numpy as np
import matplotlib as mpl
#mpl.use('Agg')
mpl.rc_file('~/.config/matplotlib/matplotlibrc')  # <-- the file containing your settings
import matplotlib.pyplot as plt


def fig_save_many(f, name, types=[".png",".pdf"], dpi=200):
    for ext in types:
        f.savefig(name+ext, dpi=dpi)
    return

def paper_single(TW = 6.64, AR = 0.74, FF = 1., fontsize=18.0, fontst="Times"):
    '''paper_single(TW = 6.64, AR = 0.74, FF = 1.)
    TW = 3.32
    AR = 0.74
    FF = 1.
    #mpl.rc('figure', figsize=(4.5,3.34), dpi=200)
    mpl.rc('figure', figsize=(FF*TW, FF*TW*AR), dpi=200)
    mpl.rc('figure.subplot', left=0.18, right=0.97, bottom=0.18, top=0.9)
    mpl.rc('lines', linewidth=1.0, markersize=4.0)
    mpl.rc('font', size=9.0, family="serif", serif="CM")
    mpl.rc('xtick', labelsize='small')
    mpl.rc('ytick', labelsize='small')
    mpl.rc('axes', linewidth=0.75)
    mpl.rc('legend', fontsize='small', numpoints=1, labelspacing=0.4, frameon=False) 
    mpl.rc('text', usetex=True) 
    mpl.rc('savefig', dpi=300)
    '''
    #import matplotlib as mpl
    # textwidht = 42pc = 42 * 12 pt = 42 * 12 * 1/72.27 inches
开发者ID:wllwen007,项目名称:utils,代码行数:31,代码来源:plot_util.py


示例19: get_ipython

#   
#   
# Modification History:
# 
#     Wrtten: Samuel LeBlanc, NASA Ames, 2018-05-30
#     Modified:

# # Load the defaults modules and setup

# In[1]:


get_ipython().magic(u'config InlineBackend.rc = {}')
import matplotlib 
import os
matplotlib.rc_file(os.path.join(os.getcwd(),'file.rc'))
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import numpy as np
import Sp_parameters as Sp
from load_utils import mat2py_time, toutc, load_ict
from Sp_parameters import smooth
from linfit import linfit
from path_utils import getpath
from plotting_utils import make_boxplot


# In[2]:


get_ipython().magic(u'matplotlib notebook')
开发者ID:samuelleblanc,项目名称:python_codes,代码行数:31,代码来源:NAAMES_2016_AATS_check.py


示例20: show_plot

    dataoutputdir = datadir+'Output/'
    GISdir = maindir+'Data/GIS/'
    figdir = maindir+'Figures/'
    tabledir = maindir+'Tables/'
    dirs={'main':maindir,'data':datadir,'GIS':GISdir,'fig':figdir}
elif git!=True: ## Local folders
    maindir = 'C:/Users/Alex/Desktop/'### samoa/
    csvoutputdir = datadir+'samoa/WATERSHED_ANALYSIS/FAGAALU/MasterDataFiles/csv_output/'
    savedir = datadir+'samoa/WATERSHED_ANALYSIS/GoodFigures/'
    figdir = datadir+'samoa/WATERSHED_ANALYSIS/GoodFigures/rawfigoutput/'
    
## Figure formatting
#publishable =  plotsettings.Set('GlobEnvChange')    ## plotsettings.py
#publishable.set_figsize(n_columns = 2, n_rows = 2)
    
mpl.rc_file(maindir+'johrc.rc')
mpl.rcParams['savefig.directory']=maindir+'rawfig/'
mpl.rcParams
mpl.rc('legend',scatterpoints=1)  
## Ticks
my_locator = matplotlib.ticker.MaxNLocator(4)

def show_plot(show=False,fig=figure):
    if show==True:
        plt.show()
        

def letter_subplots(fig,x=0.1,y=0.95,vertical='top',horizontal='right',Color='k',font_size=10,font_weight='bold'):
    sub_plot_count = 0
    sub_plot_letters = {0:'(a)',1:'(b)',2:'(c)',3:'(d)',4:'(e)',5:'(f)',6:'(g)',7:'(h)',8:'(i)'}
    for ax in fig.axes:
开发者ID:CaptainAL,项目名称:Fagaalu-Sediment-Flux,代码行数:31,代码来源:Load_Sediment_Data.py



注:本文中的matplotlib.rc_file函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python matplotlib.rc_file_defaults函数代码示例发布时间:2022-05-27
下一篇:
Python matplotlib.rc_context函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap