
Tuve que acortar el código porque no cabía aquí. Estoy intentando hacer 4 subtramas en Tikz. Utilicé Matlab y Matlab2Tikz para conseguir la figura en Latex. No puedo compilar y sigo recibiendo un mensaje de error que dice que las dimensiones son demasiado grandes. En general no puedo compilar cuando tengo líneas verticales en un gráfico. Parece funcionar si no trazo líneas verticales alrededor de los bordes. Pero incluso después de hacer esto no puedo ejecutarlo. Intenté usar logaxis pero no funciona. Puedo ver que la precisión numérica podría ser un problema. ¿Hay alguna manera de poder cargar el código completo (41.000 caracteres)?
\documentclass[12pt, a4paper]{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz,pgfplots}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{listings}
\usepackage[a4paper]{geometry}
\usepackage{caption}
\newlength\figH
\newlength\figW
\setlength{\figH}{14cm}
\setlength{\figW}{14cm}
\usepackage[utf8]{inputenc}
\usepackage{listings}
\usepackage{color}
\begin{document}
\definecolor{mycolor1}{rgb}{0.00000,0.44700,0.74100}%
\definecolor{mycolor2}{rgb}{0.85000,0.32500,0.09800}%
%
\begin{tikzpicture}
\begin{axis}[%
width=0.411\figW,
height=0.419\figH,
at={(0\figW,0.581\figH)},
scale only axis,
separate axis lines,
every outer x axis line/.append style={white!15!black},
every x tick label/.append style={font=\color{white!15!black}},
xmin=1.995,
xmax=2.002,
xtick={1.995,1.996,1.997,1.998,1.999,2,2.001,2.002},
every outer y axis line/.append style={white!15!black},
every y tick label/.append style={font=\color{white!15!black}},
ymin=0.4972,
ymax=0.4988,
ytick={0.4968,0.497085714285714,0.497371428571429,0.497657142857143,0.497942857142857,0.498228571428571,0.498514285714286,0.4988},
yticklabels={{0.4974},{0.4977},{0.4979},{0.4982},{0.4985},{0.4988}},
axis background/.style={fill=white},
title style={font=\bfseries},
title={Leverage - $\omega$ menu - 1st case},
axis on top
]
\addplot [color=mycolor1,solid,line width=3.0pt,forget plot]
table[row sep=crcr]{%
1 0.00405480160460175\\
1.05 0.0487783607094429\\
1.1 0.0903673139868394\\
1.15 0.129000385076014\\
1.2 0.164856297616192\\
1.25 0.198113775246594\\
1.3 0.228951541606446\\
1.35 0.257548320334969\\
1.4 0.284082835071388\\
1.45 0.308733809454926\\
1.5 0.331679967124806\\
1.55 0.353100031720252\\
1.6 0.37317138790318\\
1.65 0.39203679702767\\
1.7 0.409806420548708\\
1.75 0.426579957979414\\
1.8 0.442446767924539\\
1.85 0.457487093795261\\
1.9 0.471773046254589\\
1.95 0.485369454814126\\
2 0.498334622058237\\
2.05 0.510721000914645\\
2.1 0.52257580672137\\
2.15 0.533941571074948\\
2.2 0.544856642127527\\
2.25 0.555355635066074\\
2.3 0.565469836254727\\
2.35 0.575227564528552\\
2.4 0.584654493182163\\
2.45 0.593773936202264\\
2.5 0.602607102220926\\
2.55 0.611173319521002\\
2.6 0.619490235223824\\
2.65 0.627573991552496\\
2.7 0.635439381809878\\
2.75 0.643099988452892\\
2.8 0.650568305394417\\
2.85 0.657855846427376\\
2.9 0.664973241446634\\
2.95 0.671930321944941\\
3 0.678736197079697\\
3.05 0.685399321447306\\
3.1 0.691927555560306\\
3.15 0.698328219897672\\
3.2 0.704608143289324\\
3.25 0.710773706300213\\
3.3 0.716830880195881\\
3.35 0.72278526199867\\
3.4 0.728642106080454\\
3.45 0.734406352682699\\
3.5 0.740082653706761\\
3.55 0.745675396075622\\
3.6 0.751188722932027\\
3.65 0.756626552906371\\
3.7 0.761992597660164\\
3.75 0.767290377886879\\
3.8 0.772523237931033\\
3.85 0.777694359168023\\
3.9 0.782806772271205\\
3.95 0.787863368478654\\
4 0.792866909959752\\
4.05 0.797820039370921\\
4.1 0.802725288680321\\
4.15 0.807585087332991\\
4.2 0.812401769820542\\
4.25 0.817177582713024\\
4.3 0.821914691204866\\
4.35 0.826615185221763\\
4.4 0.831281085130888\\
4.45 0.835914347092908\\
4.5 0.840516868090767\\
4.55 0.845090490667171\\
4.6 0.84963700739996\\
4.65 0.854158165142206\\
4.7 0.858655669051742\\
4.75 0.863131186433027\\
4.8 0.867586350412615\\
4.85 0.872022763468134\\
4.9 0.87644200082947\\
4.95 0.880845613769834\\
5 0.885235132803554\\
5.05 0.889612070806723\\
5.1 0.893977926076298\\
5.15 0.89833418534284\\
5.2 0.90268232675182\\
5.25 0.907023822828274\\
5.3 0.911360143439611\\
5.35 0.915692758771521\\
5.4 0.920023142332188\\
5.45 0.924352774000494\\
5.5 0.928683143134431\\
5.55 0.933015751756753\\
5.6 0.937352117835778\\
5.65 0.941693778680454\\
5.7 0.946042294470084\\
5.75 0.95039925194078\\
5.8 0.95476626825252\\
5.85 0.959144995062944\\
5.9 0.963537122836488\\
5.95 0.967944385420459\\
6 0.972368564923035\\
6.05 0.976811496932123\\
6.1 0.98127507611857\\
6.15 0.985761262272532\\
6.2 0.990272086827917\\
6.25 0.994809659936966\\
6.3 0.99937617816532\\
6.35 1.00397393288761\\
6.4 1.00860531947489\\
6.45 1.0132728473786\\
6.5 1.01797915123107\\
6.55 1.02272700310144\\
6.6 1.02751932606699\\
6.65 1.03235920928632\\
6.7 1.03724992479113\\
6.75 1.04219494625035\\
6.8 1.04719797000459\\
6.85 1.05226293872207\\
6.9 1.05739406809184\\
6.95 1.06259587704886\\
7 1.06787322212149\\
7.05 1.07323133661068\\
7.1 1.07867587545612\\
7.15 1.08421296682763\\
7.2 1.0898492717074\\
7.25 1.0955920530175\\
7.3 1.10144925621185\\
7.35 1.10742960371964\\
7.4 1.11354270623065\\
7.45 1.11979919459681\\
7.5 1.12621087715541\\
7.55 1.13279092864467\\
7.6 1.13955411871401\\
7.65 1.1465170905136\\
7.7 1.15369870325595\\
7.75 1.16112045738489\\
7.8 1.16880702768564\\
7.85 1.17678693928326\\
7.9 1.18509343552524\\
7.95 1.19376560767815\\
8 1.20284988825752\\
};
\addplot [color=black,dotted,line width=0.5pt,forget plot]
table[row sep=crcr]{%
2 0.4973\\
2 0.497310357142857\\
2 0.497320714285714\\
2 0.497331071428571\\
2 0.497341428571429\\
2 0.497351785714286\\
2 0.497362142857143\\
2 0.4973725\\
2 0.497382857142857\\
2 0.497393214285714\\
2 0.497403571428571\\
2 0.497413928571429\\
2 0.497424285714286\\
2 0.497434642857143\\
2 0.497445\\
2 0.497455357142857\\
2 0.497465714285714\\
2 0.497476071428571\\
2 0.497486428571429\\
2 0.497496785714286\\
2 0.497507142857143\\
2 0.4975175\\
2 0.497527857142857\\
2 0.497538214285714\\
2 0.497548571428571\\
2 0.497558928571429\\
2 0.497569285714286\\
2 0.497579642857143\\
2 0.49759\\
2 0.497600357142857\\
2 0.497610714285714\\
2 0.497621071428571\\
2 0.497631428571429\\
2 0.497641785714286\\
2 0.497652142857143\\
2 0.4976625\\
2 0.497672857142857\\
2 0.497683214285714\\
2 0.497693571428571\\
2 0.497703928571429\\
2 0.497714285714286\\
2 0.497724642857143\\
2 0.497735\\
2 0.497745357142857\\
2 0.497755714285714\\
2 0.497766071428571\\
2 0.497776428571429\\
2 0.497786785714286\\
2 0.497797142857143\\
2 0.4978075\\
2 0.497817857142857\\
2 0.497828214285714\\
2 0.497838571428571\\
2 0.497848928571429\\
2 0.497859285714286\\
2 0.497869642857143\\
2 0.49788\\
2 0.497890357142857\\
2 0.497900714285714\\
2 0.497911071428571\\
2 0.497921428571429\\
2 0.497931785714286\\
2 0.497942142857143\\
2 0.4979525\\
2 0.497962857142857\\
2 0.497973214285714\\
2 0.497983571428571\\
2 0.497993928571429\\
2 0.498004285714286\\
2 0.498014642857143\\
2 0.498025\\
2 0.498035357142857\\
2 0.498045714285714\\
2 0.498056071428571\\
2 0.498066428571429\\
2 0.498076785714286\\
2 0.498087142857143\\
2 0.4980975\\
2 0.498107857142857\\
2 0.498118214285714\\
2 0.498128571428571\\
2 0.498138928571429\\
2 0.498149285714286\\
2 0.498159642857143\\
2 0.49817\\
2 0.498180357142857\\
2 0.498190714285714\\
2 0.498201071428571\\
2 0.498211428571429\\
2 0.498221785714286\\
2 0.498232142857143\\
2 0.4982425\\
2 0.498252857142857\\
2 0.498263214285714\\
2 0.498273571428571\\
2 0.498283928571429\\
2 0.498294285714286\\
2 0.498304642857143\\
2 0.498315\\
2 0.498325357142857\\
2 0.498335714285714\\
2 0.498346071428571\\
2 0.498356428571429\\
2 0.498366785714286\\
2 0.498377142857143\\
2 0.4983875\\
2 0.498397857142857\\
2 0.498408214285714\\
2 0.498418571428571\\
2 0.498428928571429\\
2 0.498439285714286\\
2 0.498449642857143\\
2 0.49846\\
2 0.498470357142857\\
2 0.498480714285714\\
2 0.498491071428571\\
2 0.498501428571429\\
2 0.498511785714286\\
2 0.498522142857143\\
2 0.4985325\\
2 0.498542857142857\\
2 0.498553214285714\\
2 0.498563571428571\\
2 0.498573928571429\\
2 0.498584285714286\\
2 0.498594642857143\\
2 0.498605\\
2 0.498615357142857\\
2 0.498625714285714\\
2 0.498636071428571\\
2 0.498646428571429\\
2 0.498656785714286\\
2 0.498667142857143\\
2 0.4986775\\
2 0.498687857142857\\
2 0.498698214285714\\
2 0.498708571428571\\
2 0.498718928571429\\
2 0.498729285714286\\
2 0.498739642857143\\
2 0.49875\\
};
\addplot [color=black,dashed,line width=0.5pt,forget plot]
table[row sep=crcr]{%
1.9980558757947 0.4973\\
1.9980558757947 0.4976625\\
1.9980558757947 0.498025\\
1.9980558757947 0.4983875\\
1.9980558757947 0.49875\\
};
\addplot [color=mycolor2,dashdotted,line width=0.5pt,forget plot]
table[row sep=crcr]{%
1 0.497841641027983\\
1.05 0.497841641027983\\
1.1 0.497841641027983\\
1.15 0.497841641027983\\
1.2 0.497841641027983\\
1.25 0.497841641027983\\
1.3 0.497841641027983\\
1.35 0.497841641027983\\
1.4 0.497841641027983\\
1.45 0.497841641027983\\
1.5 0.497841641027983\\
1.55 0.497841641027983\\
1.6 0.497841641027983\\
1.65 0.497841641027983\\
1.7 0.497841641027983\\
1.75 0.497841641027983\\
1.8 0.497841641027983\\
1.85 0.497841641027983\\
1.9 0.497841641027983\\
1.95 0.497841641027983\\
2 0.497841641027983\\
2.05 0.497841641027983\\
2.1 0.497841641027983\\
2.15 0.497841641027983\\
2.2 0.497841641027983\\
2.25 0.497841641027983\\
2.3 0.497841641027983\\
2.35 0.497841641027983\\
2.4 0.497841641027983\\
2.45 0.497841641027983\\
2.5 0.497841641027983\\
2.55 0.497841641027983\\
2.6 0.497841641027983\\
2.65 0.497841641027983\\
2.7 0.497841641027983\\
2.75 0.497841641027983\\
2.8 0.497841641027983\\
2.85 0.497841641027983\\
2.9 0.497841641027983\\
2.95 0.497841641027983\\
3 0.497841641027983\\
3.05 0.497841641027983\\
3.1 0.497841641027983\\
3.15 0.497841641027983\\
3.2 0.497841641027983\\
3.25 0.497841641027983\\
3.3 0.497841641027983\\
3.35 0.497841641027983\\
3.4 0.497841641027983\\
3.45 0.497841641027983\\
3.5 0.497841641027983\\
3.55 0.497841641027983\\
3.6 0.497841641027983\\
3.65 0.497841641027983\\
3.7 0.497841641027983\\
3.75 0.497841641027983\\
3.8 0.497841641027983\\
3.85 0.497841641027983\\
3.9 0.497841641027983\\
3.95 0.497841641027983\\
4 0.497841641027983\\
4.05 0.497841641027983\\
4.1 0.497841641027983\\
4.15 0.497841641027983\\
4.2 0.497841641027983\\
4.25 0.497841641027983\\
4.3 0.497841641027983\\
4.35 0.497841641027983\\
4.4 0.497841641027983\\
4.45 0.497841641027983\\
4.5 0.497841641027983\\
4.55 0.497841641027983\\
4.6 0.497841641027983\\
4.65 0.497841641027983\\
4.7 0.497841641027983\\
4.75 0.497841641027983\\
4.8 0.497841641027983\\
4.85 0.497841641027983\\
4.9 0.497841641027983\\
4.95 0.497841641027983\\
5 0.497841641027983\\
5.05 0.497841641027983\\
5.1 0.497841641027983\\
5.15 0.497841641027983\\
5.2 0.497841641027983\\
5.25 0.497841641027983\\
5.3 0.497841641027983\\
5.35 0.497841641027983\\
5.4 0.497841641027983\\
5.45 0.497841641027983\\
5.5 0.497841641027983\\
5.55 0.497841641027983\\
5.6 0.497841641027983\\
5.65 0.497841641027983\\
5.7 0.497841641027983\\
5.75 0.497841641027983\\
5.8 0.497841641027983\\
5.85 0.497841641027983\\
5.9 0.497841641027983\\
5.95 0.497841641027983\\
6 0.497841641027983\\
6.05 0.497841641027983\\
6.1 0.497841641027983\\
6.15 0.497841641027983\\
6.2 0.497841641027983\\
6.25 0.497841641027983\\
6.3 0.497841641027983\\
6.35 0.497841641027983\\
6.4 0.497841641027983\\
6.45 0.497841641027983\\
6.5 0.497841641027983\\
6.55 0.497841641027983\\
6.6 0.497841641027983\\
6.65 0.497841641027983\\
6.7 0.497841641027983\\
6.75 0.497841641027983\\
6.8 0.497841641027983\\
6.85 0.497841641027983\\
6.9 0.497841641027983\\
6.95 0.497841641027983\\
7 0.497841641027983\\
7.05 0.497841641027983\\
7.1 0.497841641027983\\
7.15 0.497841641027983\\
7.2 0.497841641027983\\
7.25 0.497841641027983\\
7.3 0.497841641027983\\
7.35 0.497841641027983\\
7.4 0.497841641027983\\
7.45 0.497841641027983\\
7.5 0.497841641027983\\
7.55 0.497841641027983\\
7.6 0.497841641027983\\
7.65 0.497841641027983\\
7.7 0.497841641027983\\
7.75 0.497841641027983\\
7.8 0.497841641027983\\
7.85 0.497841641027983\\
7.9 0.497841641027983\\
7.95 0.497841641027983\\
8 0.497841641027983\\
};
\end{axis}
\end{tikzpicture}%
\end{document}
Respuesta1
Esto es lo que obtengo después de deshacerme de la mayoría de las opciones automáticas emitidas por matlab2tikz:
\begin{axis}[%
scale only axis,
separate axis lines,
axis background/.style={fill=white},
title style={font=\bfseries},
title={Leverage - $\omega$ menu - 1st case},
axis on top
]
...
\end{axis}
matlab2tikz es una gran herramienta pero no puede hacer milagros, ¡verifique siempre las opciones!