Posted By

osjerick on 01/13/18


Tagged


Versions (?)

Configuración personalizada para axis de PGFPlots


 / Published in: LaTeX
 

Configuraciones para axis de PGFPlots y secuencias de colores de Matlab o Matplotlib.

  1. % Tamaños
  2. \pgfplotsset{
  3. width=7.8cm
  4. }
  5.  
  6. % Fuentes
  7. \pgfplotsset{ %
  8. title style={font=\footnotesize},
  9. tick label style={font=\scriptsize},
  10. label style={font=\footnotesize},
  11. legend style={font=\footnotesize},
  12. }
  13.  
  14. % Colores Matplotlib y cycle list
  15. \definecolor{matplotlib-C0}{HTML}{1F77B4}
  16. \definecolor{matplotlib-C1}{HTML}{FF7F0E}
  17. \definecolor{matplotlib-C2}{HTML}{2CA02C}
  18. \definecolor{matplotlib-C3}{HTML}{D62728}
  19. \definecolor{matplotlib-C4}{HTML}{9467BD}
  20. \definecolor{matplotlib-C5}{HTML}{8C564B}
  21. \definecolor{matplotlib-C6}{HTML}{E377C2}
  22. \definecolor{matplotlib-C7}{HTML}{7F7F7F}
  23. \definecolor{matplotlib-C8}{HTML}{BCBD22}
  24. \definecolor{matplotlib-C9}{HTML}{17BECF}
  25.  
  26. \pgfplotscreateplotcyclelist{matplotlib}{
  27. {matplotlib-C0, mark=o, mark size=1.6pt},
  28. {matplotlib-C1, mark=+},
  29. {matplotlib-C2, mark=triangle},
  30. {matplotlib-C3, mark=star},
  31. {matplotlib-C4, mark=diamond},
  32. {matplotlib-C5, mark=x},
  33. {matplotlib-C6, mark=square, mark size=1.4pt},
  34. {matplotlib-C7, mark=10-pointed star},
  35. {matplotlib-C8, mark=otimes, mark size=1.6pt},
  36. {matplotlib-C9, mark=Mercedes star flipped}
  37. }
  38.  
  39. % Colores Matlab y cycle list
  40. \definecolor{matlab-C0}{HTML}{0072BD}
  41. \definecolor{matlab-C1}{HTML}{D95319}
  42. \definecolor{matlab-C2}{HTML}{EDB120}
  43. \definecolor{matlab-C3}{HTML}{7E2F8E}
  44. \definecolor{matlab-C4}{HTML}{77AC30}
  45. \definecolor{matlab-C5}{HTML}{4DBEEE}
  46. \definecolor{matlab-C6}{HTML}{A2142F}
  47.  
  48. \pgfplotscreateplotcyclelist{matlab}{
  49. {matlab-C0, mark=o, mark size=1.6pt},
  50. {matlab-C1, mark=+},
  51. {matlab-C2, mark=triangle},
  52. {matlab-C3, mark=star},
  53. {matlab-C4, mark=diamond},
  54. {matlab-C5, mark=x},
  55. {matlab-C6, mark=square, mark size=1.4pt}
  56. }
  57.  
  58. % Configuración de axis y plots
  59. \pgfplotsset{%
  60. every axis/.append style={%
  61. enlarge x limits=false,
  62. minor tick num=3,
  63. grid=both,
  64. line width=0.7pt,
  65. cycle list name=matlab},
  66. every axis plot post/.append style={%
  67. mark options={%
  68. mark=none,
  69. line width=.4pt},
  70. line width=0.8pt},
  71. every minor tick/.append style={lightgray!90},
  72. every major grid/.append style={%
  73. lightgray,
  74. line width=.3pt},
  75. every minor grid/.append style={%
  76. lightgray!90,
  77. dotted,
  78. line width=.3pt}
  79. }

Report this snippet  

You need to login to post a comment.