使用轴线*=left 时原点处的间隙,并通过轴线样式指定线宽

使用轴线*=left 时原点处的间隙,并通过轴线样式指定线宽

请原谅此处显示的奇怪图表 - 我只是试图在存在我尝试使用的所有包的情况下显示可复制的代码块,并希望避免显示在我的 tex 代码之外生成的数据。无论我想出什么解决方案,理想情况下都会推广到groupplot(即我试图避免通过从头开始绘制我的轴\draw)。我正尝试在 XeLaTeX 中编译它。

以下块:

\documentclass{standalone}

\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{fontspec}
\usepackage{fixltx2e}
\definecolor{nice_blue}{HTML}{377EB8}
\definecolor{nice_green}{HTML}{4DAF4A}


\begin{document}
\begin{tikzpicture}
\node at (.75,4.5) {\fontspec{Arial}w\textsubscript{1}};
\node at (1.25,5) {\fontspec{Arial}w\textsubscript{2}};
\node at (1.75,5.45) {\fontspec{Arial}w\textsubscript{3}};
\node[color=nice_green] at (5.35,3.5) {\fontspec{Arial}Well-being};
\begin{axis}[
    axis lines*=left,
    ytick=\empty,
    xtick=\empty,
    xmin=0,
    xmax=12,
    ymin=0,
    ymax=12,
    xlabel=\fontspec{Arial}Household Produced Investments x\textsubscript{ch},
    ylabel=\fontspec{Arial}Market Purchased Investments x\textsubscript{cm},
    axis line style = {line width=2.83464567pt},
    enlarge x limits=false
]
\addplot[->, nice_blue, line width=2.83464567pt] plot coordinates{(1,1)(5,5)};
\addplot[->, nice_green, line width=2.83464567pt] plot coordinates{(7,7)(8.5,9)};
\end{axis}
\end{tikzpicture}
\end{document} 

应产生以下图:

在此处输入图片描述

我想知道如何在我的轴上获得一个干净的“斜接”角而没有间隙,而不是下面放大的图像中显示的间隙:

在此处输入图片描述

答案1

对于此配置,按如下方式更改行即可修复此问题。

axis line style = {line width=2.83464567pt,shorten <=-0.5\pgflinewidth},

由于在这种特殊情况下轴线是单独绘制的,因此可能不值得通过其他方式强制线连接。

在此处输入图片描述

相关内容