1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Beamer(LaTeX)にMathematicaのグラフの色を表示する

Last updated at Posted at 2020-08-06

自分用メモも兼ねて.
Beamerでスライドを作る際に,Mathematicaで作ったグラフを映す場面もあるかと思います.青は〇〇,黄色は〇〇と黒字で書くのはなんとなくカッコ悪いので,Mathematicaのグラフの色で文字を表示させたいです.
以下のサイトを参考にしました.
[Matplotlib][Mathematica][Matlab] グラフのデフォルトのブルー
LaTeXにおける文字の色指定

Beamerの設定

使っているthemeの関係で,XeLaTeXを使用する場合について書きますがpLaTeXでも同様です.スライド.texのプリアンブルに

slide.tex
\usepackage[]{graphicx,xcolor}

と記述します.

Mathematicaで色を調べる

あまり私自身よく理解していないのですが,Mathematicaで

math.nb
ColorData[97, "ColorList"][[1]] // InputForm

と打つと,デフォルトのグラフで出てくる青色が判ります.また,グラフを二つ以上描いた時の二番目に出てくる黄色は

math.nb
ColorData[97, "ColorList"][[2]] // InputForm

で判ります.

LaTeXに色を入れる

slide.tex
  {\color[rgb]{0.368417,0.506779,0.709798}{Mathematicaの青}}
  {\color[rgb]{0.880722, 0.611041, 0.142051}{Mathematicaの黄色}}

で表示できます.

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?