Pythonista3 Matplotlib styleのソースを表示
新しいページはコチラ
移動:
案内
,
検索
[[Pythonista3]]に戻る ==matplotlibの*.mplstyleによるstyle適用== Pythonista3では、初期状態では5つのstyleセットが準備されています。最新版では20を超えるセットが用意されています。styleセットは*.mplstyleファイルによって定義して追加できますが、pythonista3では簡単にstyleセットが増やすことは出来ないため、その手順を以下に示します。 1.stashを導入する。 2.”mplstyleファイルをpythonista3でpython module>site-package-3>matplotlib>stylelibに作成する。ここではexample.mplstyleとします。 3.stashで以下のようなコマンドを実行する cd site-package-3/matplotlib/style lib cp example.mplestyle ~/.matplotlib/stylelib/ ==matplotlib version1.4.0のstyleキー一覧== 最新版よりversion1.4.0の方がstyleキーは少ないです。 例えば axes.prop_cycleというキーは使えないため、それに対応するキーはaxes.color_cycleとなります。対応するとはいえ機能は異なり、使い方が違います。prop_cycleではcycler()という関数で定義し、cycler(color=[‘RGB hex_value_1’, ..., ‘hex_value_n’],line=[‘line_style_marker_simbol’])という形式で、color_cycleはシングルクォートも使わず RGB_hex_value_1, RGB_hex_value_2, ..., RGB_hex_value_nという値を設定します。 このように使えるキーが異なることに注意が必要です。 利用できるキー一覧は以下のとおりです。 値はデフォルト値 <syntaxhighlight lang="text"> font.size: 12 font.stretch: normal font.style: normal font.variant: normal font.weight: normal grid.alpha: 1.0 grid.color: k grid.linestyle: : grid.linewidth: 0.5 image.aspect: equal image.cmap: jet image.interpolation: bilinear image.lut: 256 image.origin: upper image.resample: False interactive: False keymap.all_axes: a keymap.back: ['left', 'c', 'backspace'] keymap.forward: ['right', 'v'] keymap.fullscreen: ('f', 'ctrl+f') keymap.grid: g keymap.home: ['h', 'r', 'home'] keymap.pan: p keymap.quit: ('ctrl+w', 'cmd+w') keymap.save: ('s', 'ctrl+s') keymap.xscale: ['k', 'L'] keymap.yscale: l keymap.zoom: o legend.borderaxespad: 0.5 legend.borderpad: 0.4 legend.columnspacing: 2.0 legend.fancybox: False legend.fontsize: large legend.frameon: True legend.handleheight: 0.7 legend.handlelength: 2.0 legend.handletextpad: 0.8 legend.isaxes: True legend.labelspacing: 0.5 legend.loc: upper right legend.markerscale: 1.0 legend.numpoints: 2 legend.scatterpoints: 3 legend.shadow: False lines.antialiased: True lines.color: b lines.dash_capstyle: butt lines.dash_joinstyle: round lines.linestyle: - lines.linewidth: 1.0 lines.marker: None lines.markeredgewidth: 0.5 lines.markersize: 6 lines.solid_capstyle: projecting lines.solid_joinstyle: round mathtext.bf: serif:bold mathtext.cal: cursive mathtext.default: it mathtext.fallback_to_cm: True mathtext.fontset: cm mathtext.it: serif:italic mathtext.rm: serif mathtext.sf: sans\-serif mathtext.tt: monospace patch.antialiased: True patch.edgecolor: k patch.facecolor: b patch.linewidth: 1.0 path.effects: [] path.simplify: True path.simplify_threshold: 0.1111111111111111 path.sketch: None path.snap: True pdf.compression: 6 pdf.fonttype: 3 pdf.inheritcolor: False pdf.use14corefonts: False pgf.debug: False pgf.preamble: [''] pgf.rcfonts: True pgf.texsystem: xelatex plugins.directory: .matplotlib_plugins polaraxes.grid: True ps.distiller.res: 6000 ps.fonttype: 3 ps.papersize: letter ps.useafm: False ps.usedistiller: False savefig.bbox: None savefig.directory: ~ savefig.dpi: 100 savefig.edgecolor: w savefig.extension: png savefig.facecolor: w savefig.format: png savefig.frameon: True savefig.jpeg_quality: 95 savefig.orientation: portrait savefig.pad_inches: 0.1 savefig.transparent: False svg.embed_char_paths: True svg.fonttype: path svg.image_inline: True svg.image_noscale: False text.antialiased: True text.color: k text.dvipnghack: None text.hinting: True text.hinting_factor: 8 text.latex.preamble: [''] text.latex.preview: False text.latex.unicode: False text.usetex: False timezone: UTC tk.pythoninspect: False tk.window_focus: False toolbar: toolbar2 verbose.fileo: sys.stdout verbose.level: silent webagg.open_in_browser: True webagg.port: 8988 webagg.port_retries: 50 xtick.color: k xtick.direction: in xtick.labelsize: medium xtick.major.pad: 4 xtick.major.size: 4 xtick.major.width: 0.5 xtick.minor.pad: 4 xtick.minor.size: 2 xtick.minor.width: 0.5 ytick.color: k ytick.direction: in ytick.labelsize: medium ytick.major.pad: 4 ytick.major.size: 4 ytick.major.width: 0.5 ytick.minor.pad: 4 ytick.minor.size: 2 ytick.minor.width: 0.5 </syntaxhighlight> [[Pythonista3]]に戻る
Pythonista3 Matplotlib style
に戻る。
個人用ツール
ログイン
名前空間
ページ
議論
変種
表示
閲覧
ソースを表示
履歴表示
操作
検索
案内
メインページ
コミュニティ・ポータル
最近の出来事
最近の更新
おまかせ表示
ヘルプ
ツールボックス
リンク元
関連ページの更新状況
特別ページ