Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Please forgive the strange graph displayed here - I am simply trying to display a replicable chunk of code in the presence of all the packages I am attempting to use and want to avoid displaying data generated outside of my tex code. Whatever solution I come up would ideally generalize to groupplot (i.e. I am trying to avoid drawing my axes from scratch via \draw). I am attempting to compile this in XeLaTeX.

The following chunk:

\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} 

Should yield the following plot:

enter image description here

I would like to know how to get a clean "mitred" corner in my axis with no gap as opposed to the gap shown in the zoomed image below:

enter image description here

share|improve this question

1 Answer 1

up vote 1 down vote accepted

For this configuration changing the line as below would fix it.

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

Since the axis lines are drawn separately in this particular case, it might not be worth to force a line join there by other means.

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.