Spurious space from tdplotsetmaincoords












1















The MWE below results is spurious space due to the use of tdplotsetmaincoords:



enter image description here



The red is the bounding box and the gray box is from fbox{}.



Including an unskipunskip (commented out in the MWE) does resolve the problem, but wondering if there is a better solution.



Is this a bug or is there a reason for this spacing?



Notes:




  • Moving the tdplotsetmaincoords{70}{115} to be before begin{document} also resolves the problem, but this won't easily work for me as my figures use the standalone class and are included in other documents -- thus I need to have that setting localized with each figure.


References:




  • The code for the cube drawing is from How to draw a cube with TikZ where all faces have a distinct color?.


Code:



documentclass{article}
usepackage{tikz,tikz-3dplot}

newcommand*{DrawBoundingBox}[1]{%
draw [
draw=red, thick,
]
([shift={(-1pt,-1pt)}]current bounding box.south west) rectangle
([shift={(1pt,1pt)}]current bounding box.north east);
}

begin{document}
fboxsep=0pt
fbox{%
%% code from https://tex.stackexchange.com/a/29342/4301
tdplotsetmaincoords{70}{115}%
%unskipunskip% <----- HACK which fixes the problem.
begin{tikzpicture}[scale=4,tdplot_main_coords]
coordinate (O) at (0,0,0);
tdplotsetcoord{P}{1.414213}{54.68636}{45}

draw[fill=gray!50,fill opacity=0.5] (O) -- (Py) -- (Pyz) -- (Pz) -- cycle;
draw[fill=blue,fill opacity=0.5] (O) -- (Px) -- (Pxy) -- (Py) -- cycle;
draw[fill=yellow,fill opacity=0.5] (O) -- (Px) -- (Pxz) -- (Pz) -- cycle;
draw[fill=green,fill opacity=0.5] (Pz) -- (Pyz) -- (P) -- (Pxz) -- cycle;
draw[fill=red,fill opacity=0.5] (Px) -- (Pxy) -- (P) -- (Pxz) -- cycle;
draw[fill=magenta,fill opacity=0.5] (Py) -- (Pxy) -- (P) -- (Pyz) -- cycle;

DrawBoundingBox
end{tikzpicture}%
}%
end{document}









share|improve this question


















  • 1





    It's unlikely that this will get fixed in tikz-3dplot. The last update was in 2012 and there are no contact details of the author in the manual.

    – Henri Menke
    1 hour ago











  • @HenriMenke After quick research, it seems I have found useful informations for contact the author of the tikz-3dplot package. From heinjd.wordpress.com/category/latex, I read in the bottom "Some time ago, I developed the 3dplot package". On heinjd.wordpress.com/about, I read "Jeff recently received a Ph.D. from the University of Manitoba Department of Physics and Astronomy." Finally, I found this JPL page: science.jpl.nasa.gov/people/Hein, with coordinate and CV. Correspond to the informations of the tikz-3dplot author.

    – quark67
    1 hour ago
















1















The MWE below results is spurious space due to the use of tdplotsetmaincoords:



enter image description here



The red is the bounding box and the gray box is from fbox{}.



Including an unskipunskip (commented out in the MWE) does resolve the problem, but wondering if there is a better solution.



Is this a bug or is there a reason for this spacing?



Notes:




  • Moving the tdplotsetmaincoords{70}{115} to be before begin{document} also resolves the problem, but this won't easily work for me as my figures use the standalone class and are included in other documents -- thus I need to have that setting localized with each figure.


References:




  • The code for the cube drawing is from How to draw a cube with TikZ where all faces have a distinct color?.


Code:



documentclass{article}
usepackage{tikz,tikz-3dplot}

newcommand*{DrawBoundingBox}[1]{%
draw [
draw=red, thick,
]
([shift={(-1pt,-1pt)}]current bounding box.south west) rectangle
([shift={(1pt,1pt)}]current bounding box.north east);
}

begin{document}
fboxsep=0pt
fbox{%
%% code from https://tex.stackexchange.com/a/29342/4301
tdplotsetmaincoords{70}{115}%
%unskipunskip% <----- HACK which fixes the problem.
begin{tikzpicture}[scale=4,tdplot_main_coords]
coordinate (O) at (0,0,0);
tdplotsetcoord{P}{1.414213}{54.68636}{45}

draw[fill=gray!50,fill opacity=0.5] (O) -- (Py) -- (Pyz) -- (Pz) -- cycle;
draw[fill=blue,fill opacity=0.5] (O) -- (Px) -- (Pxy) -- (Py) -- cycle;
draw[fill=yellow,fill opacity=0.5] (O) -- (Px) -- (Pxz) -- (Pz) -- cycle;
draw[fill=green,fill opacity=0.5] (Pz) -- (Pyz) -- (P) -- (Pxz) -- cycle;
draw[fill=red,fill opacity=0.5] (Px) -- (Pxy) -- (P) -- (Pxz) -- cycle;
draw[fill=magenta,fill opacity=0.5] (Py) -- (Pxy) -- (P) -- (Pyz) -- cycle;

DrawBoundingBox
end{tikzpicture}%
}%
end{document}









share|improve this question


















  • 1





    It's unlikely that this will get fixed in tikz-3dplot. The last update was in 2012 and there are no contact details of the author in the manual.

    – Henri Menke
    1 hour ago











  • @HenriMenke After quick research, it seems I have found useful informations for contact the author of the tikz-3dplot package. From heinjd.wordpress.com/category/latex, I read in the bottom "Some time ago, I developed the 3dplot package". On heinjd.wordpress.com/about, I read "Jeff recently received a Ph.D. from the University of Manitoba Department of Physics and Astronomy." Finally, I found this JPL page: science.jpl.nasa.gov/people/Hein, with coordinate and CV. Correspond to the informations of the tikz-3dplot author.

    – quark67
    1 hour ago














1












1








1








The MWE below results is spurious space due to the use of tdplotsetmaincoords:



enter image description here



The red is the bounding box and the gray box is from fbox{}.



Including an unskipunskip (commented out in the MWE) does resolve the problem, but wondering if there is a better solution.



Is this a bug or is there a reason for this spacing?



Notes:




  • Moving the tdplotsetmaincoords{70}{115} to be before begin{document} also resolves the problem, but this won't easily work for me as my figures use the standalone class and are included in other documents -- thus I need to have that setting localized with each figure.


References:




  • The code for the cube drawing is from How to draw a cube with TikZ where all faces have a distinct color?.


Code:



documentclass{article}
usepackage{tikz,tikz-3dplot}

newcommand*{DrawBoundingBox}[1]{%
draw [
draw=red, thick,
]
([shift={(-1pt,-1pt)}]current bounding box.south west) rectangle
([shift={(1pt,1pt)}]current bounding box.north east);
}

begin{document}
fboxsep=0pt
fbox{%
%% code from https://tex.stackexchange.com/a/29342/4301
tdplotsetmaincoords{70}{115}%
%unskipunskip% <----- HACK which fixes the problem.
begin{tikzpicture}[scale=4,tdplot_main_coords]
coordinate (O) at (0,0,0);
tdplotsetcoord{P}{1.414213}{54.68636}{45}

draw[fill=gray!50,fill opacity=0.5] (O) -- (Py) -- (Pyz) -- (Pz) -- cycle;
draw[fill=blue,fill opacity=0.5] (O) -- (Px) -- (Pxy) -- (Py) -- cycle;
draw[fill=yellow,fill opacity=0.5] (O) -- (Px) -- (Pxz) -- (Pz) -- cycle;
draw[fill=green,fill opacity=0.5] (Pz) -- (Pyz) -- (P) -- (Pxz) -- cycle;
draw[fill=red,fill opacity=0.5] (Px) -- (Pxy) -- (P) -- (Pxz) -- cycle;
draw[fill=magenta,fill opacity=0.5] (Py) -- (Pxy) -- (P) -- (Pyz) -- cycle;

DrawBoundingBox
end{tikzpicture}%
}%
end{document}









share|improve this question














The MWE below results is spurious space due to the use of tdplotsetmaincoords:



enter image description here



The red is the bounding box and the gray box is from fbox{}.



Including an unskipunskip (commented out in the MWE) does resolve the problem, but wondering if there is a better solution.



Is this a bug or is there a reason for this spacing?



Notes:




  • Moving the tdplotsetmaincoords{70}{115} to be before begin{document} also resolves the problem, but this won't easily work for me as my figures use the standalone class and are included in other documents -- thus I need to have that setting localized with each figure.


References:




  • The code for the cube drawing is from How to draw a cube with TikZ where all faces have a distinct color?.


Code:



documentclass{article}
usepackage{tikz,tikz-3dplot}

newcommand*{DrawBoundingBox}[1]{%
draw [
draw=red, thick,
]
([shift={(-1pt,-1pt)}]current bounding box.south west) rectangle
([shift={(1pt,1pt)}]current bounding box.north east);
}

begin{document}
fboxsep=0pt
fbox{%
%% code from https://tex.stackexchange.com/a/29342/4301
tdplotsetmaincoords{70}{115}%
%unskipunskip% <----- HACK which fixes the problem.
begin{tikzpicture}[scale=4,tdplot_main_coords]
coordinate (O) at (0,0,0);
tdplotsetcoord{P}{1.414213}{54.68636}{45}

draw[fill=gray!50,fill opacity=0.5] (O) -- (Py) -- (Pyz) -- (Pz) -- cycle;
draw[fill=blue,fill opacity=0.5] (O) -- (Px) -- (Pxy) -- (Py) -- cycle;
draw[fill=yellow,fill opacity=0.5] (O) -- (Px) -- (Pxz) -- (Pz) -- cycle;
draw[fill=green,fill opacity=0.5] (Pz) -- (Pyz) -- (P) -- (Pxz) -- cycle;
draw[fill=red,fill opacity=0.5] (Px) -- (Pxy) -- (P) -- (Pxz) -- cycle;
draw[fill=magenta,fill opacity=0.5] (Py) -- (Pxy) -- (P) -- (Pyz) -- cycle;

DrawBoundingBox
end{tikzpicture}%
}%
end{document}






tikz-pgf spacing draw






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 hours ago









Peter GrillPeter Grill

166k25442756




166k25442756








  • 1





    It's unlikely that this will get fixed in tikz-3dplot. The last update was in 2012 and there are no contact details of the author in the manual.

    – Henri Menke
    1 hour ago











  • @HenriMenke After quick research, it seems I have found useful informations for contact the author of the tikz-3dplot package. From heinjd.wordpress.com/category/latex, I read in the bottom "Some time ago, I developed the 3dplot package". On heinjd.wordpress.com/about, I read "Jeff recently received a Ph.D. from the University of Manitoba Department of Physics and Astronomy." Finally, I found this JPL page: science.jpl.nasa.gov/people/Hein, with coordinate and CV. Correspond to the informations of the tikz-3dplot author.

    – quark67
    1 hour ago














  • 1





    It's unlikely that this will get fixed in tikz-3dplot. The last update was in 2012 and there are no contact details of the author in the manual.

    – Henri Menke
    1 hour ago











  • @HenriMenke After quick research, it seems I have found useful informations for contact the author of the tikz-3dplot package. From heinjd.wordpress.com/category/latex, I read in the bottom "Some time ago, I developed the 3dplot package". On heinjd.wordpress.com/about, I read "Jeff recently received a Ph.D. from the University of Manitoba Department of Physics and Astronomy." Finally, I found this JPL page: science.jpl.nasa.gov/people/Hein, with coordinate and CV. Correspond to the informations of the tikz-3dplot author.

    – quark67
    1 hour ago








1




1





It's unlikely that this will get fixed in tikz-3dplot. The last update was in 2012 and there are no contact details of the author in the manual.

– Henri Menke
1 hour ago





It's unlikely that this will get fixed in tikz-3dplot. The last update was in 2012 and there are no contact details of the author in the manual.

– Henri Menke
1 hour ago













@HenriMenke After quick research, it seems I have found useful informations for contact the author of the tikz-3dplot package. From heinjd.wordpress.com/category/latex, I read in the bottom "Some time ago, I developed the 3dplot package". On heinjd.wordpress.com/about, I read "Jeff recently received a Ph.D. from the University of Manitoba Department of Physics and Astronomy." Finally, I found this JPL page: science.jpl.nasa.gov/people/Hein, with coordinate and CV. Correspond to the informations of the tikz-3dplot author.

– quark67
1 hour ago





@HenriMenke After quick research, it seems I have found useful informations for contact the author of the tikz-3dplot package. From heinjd.wordpress.com/category/latex, I read in the bottom "Some time ago, I developed the 3dplot package". On heinjd.wordpress.com/about, I read "Jeff recently received a Ph.D. from the University of Manitoba Department of Physics and Astronomy." Finally, I found this JPL page: science.jpl.nasa.gov/people/Hein, with coordinate and CV. Correspond to the informations of the tikz-3dplot author.

– quark67
1 hour ago










1 Answer
1






active

oldest

votes


















3














There are spurious spaces in the code. Notify the maintainer.



documentclass{article}
usepackage{tikz}
usepackage{tikz-3dplot}

newcommand*{DrawBoundingBox}[1]{%
draw [
draw=red, thick,
]
([shift={(-1pt,-1pt)}]current bounding box.south west) rectangle
([shift={(1pt,1pt)}]current bounding box.north east);
}
renewcommand{tdplotsetmaincoords}[2]{%
%perform some trig for the display transformation
%
%
%store the user-specified angles for possible future use
pgfmathsetmacro{tdplotmaintheta}{#1}% <------ changed
pgfmathsetmacro{tdplotmainphi}{#2}% <------- changed
%
%
tdplotcalctransformmainscreen
%
%now here is where the output is performed
tikzset{tdplot_main_coords/.style={x={(raarot cm,rbarot cm)},y={(rabrot cm, rbbrot cm)},z={(racrot cm, rbcrot cm)}}}%
}

begin{document}
fboxsep=0pt
fbox{%
%% code from https://tex.stackexchange.com/a/29342/4301
tdplotsetmaincoords{70}{115}%
%unskipunskip% <----- HACK which fixes the problem.
begin{tikzpicture}[scale=4,tdplot_main_coords]
coordinate (O) at (0,0,0);
tdplotsetcoord{P}{1.414213}{54.68636}{45}

draw[fill=gray!50,fill opacity=0.5] (O) -- (Py) -- (Pyz) -- (Pz) -- cycle;
draw[fill=blue,fill opacity=0.5] (O) -- (Px) -- (Pxy) -- (Py) -- cycle;
draw[fill=yellow,fill opacity=0.5] (O) -- (Px) -- (Pxz) -- (Pz) -- cycle;
draw[fill=green,fill opacity=0.5] (Pz) -- (Pyz) -- (P) -- (Pxz) -- cycle;
draw[fill=red,fill opacity=0.5] (Px) -- (Pxy) -- (P) -- (Pxz) -- cycle;
draw[fill=magenta,fill opacity=0.5] (Py) -- (Pxy) -- (P) -- (Pyz) -- cycle;

DrawBoundingBox
end{tikzpicture}%
}%
end{document}


enter image description here






share|improve this answer
























  • Thanks. Good to know that it is an easy fix in the tikz-pgf code. Sadly have to wait a few minutes to accept the answer.

    – Peter Grill
    2 hours ago








  • 1





    the command is in tikz-3dplot, not tikz directly.

    – Ulrike Fischer
    1 hour ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479734%2fspurious-space-from-tdplotsetmaincoords%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














There are spurious spaces in the code. Notify the maintainer.



documentclass{article}
usepackage{tikz}
usepackage{tikz-3dplot}

newcommand*{DrawBoundingBox}[1]{%
draw [
draw=red, thick,
]
([shift={(-1pt,-1pt)}]current bounding box.south west) rectangle
([shift={(1pt,1pt)}]current bounding box.north east);
}
renewcommand{tdplotsetmaincoords}[2]{%
%perform some trig for the display transformation
%
%
%store the user-specified angles for possible future use
pgfmathsetmacro{tdplotmaintheta}{#1}% <------ changed
pgfmathsetmacro{tdplotmainphi}{#2}% <------- changed
%
%
tdplotcalctransformmainscreen
%
%now here is where the output is performed
tikzset{tdplot_main_coords/.style={x={(raarot cm,rbarot cm)},y={(rabrot cm, rbbrot cm)},z={(racrot cm, rbcrot cm)}}}%
}

begin{document}
fboxsep=0pt
fbox{%
%% code from https://tex.stackexchange.com/a/29342/4301
tdplotsetmaincoords{70}{115}%
%unskipunskip% <----- HACK which fixes the problem.
begin{tikzpicture}[scale=4,tdplot_main_coords]
coordinate (O) at (0,0,0);
tdplotsetcoord{P}{1.414213}{54.68636}{45}

draw[fill=gray!50,fill opacity=0.5] (O) -- (Py) -- (Pyz) -- (Pz) -- cycle;
draw[fill=blue,fill opacity=0.5] (O) -- (Px) -- (Pxy) -- (Py) -- cycle;
draw[fill=yellow,fill opacity=0.5] (O) -- (Px) -- (Pxz) -- (Pz) -- cycle;
draw[fill=green,fill opacity=0.5] (Pz) -- (Pyz) -- (P) -- (Pxz) -- cycle;
draw[fill=red,fill opacity=0.5] (Px) -- (Pxy) -- (P) -- (Pxz) -- cycle;
draw[fill=magenta,fill opacity=0.5] (Py) -- (Pxy) -- (P) -- (Pyz) -- cycle;

DrawBoundingBox
end{tikzpicture}%
}%
end{document}


enter image description here






share|improve this answer
























  • Thanks. Good to know that it is an easy fix in the tikz-pgf code. Sadly have to wait a few minutes to accept the answer.

    – Peter Grill
    2 hours ago








  • 1





    the command is in tikz-3dplot, not tikz directly.

    – Ulrike Fischer
    1 hour ago
















3














There are spurious spaces in the code. Notify the maintainer.



documentclass{article}
usepackage{tikz}
usepackage{tikz-3dplot}

newcommand*{DrawBoundingBox}[1]{%
draw [
draw=red, thick,
]
([shift={(-1pt,-1pt)}]current bounding box.south west) rectangle
([shift={(1pt,1pt)}]current bounding box.north east);
}
renewcommand{tdplotsetmaincoords}[2]{%
%perform some trig for the display transformation
%
%
%store the user-specified angles for possible future use
pgfmathsetmacro{tdplotmaintheta}{#1}% <------ changed
pgfmathsetmacro{tdplotmainphi}{#2}% <------- changed
%
%
tdplotcalctransformmainscreen
%
%now here is where the output is performed
tikzset{tdplot_main_coords/.style={x={(raarot cm,rbarot cm)},y={(rabrot cm, rbbrot cm)},z={(racrot cm, rbcrot cm)}}}%
}

begin{document}
fboxsep=0pt
fbox{%
%% code from https://tex.stackexchange.com/a/29342/4301
tdplotsetmaincoords{70}{115}%
%unskipunskip% <----- HACK which fixes the problem.
begin{tikzpicture}[scale=4,tdplot_main_coords]
coordinate (O) at (0,0,0);
tdplotsetcoord{P}{1.414213}{54.68636}{45}

draw[fill=gray!50,fill opacity=0.5] (O) -- (Py) -- (Pyz) -- (Pz) -- cycle;
draw[fill=blue,fill opacity=0.5] (O) -- (Px) -- (Pxy) -- (Py) -- cycle;
draw[fill=yellow,fill opacity=0.5] (O) -- (Px) -- (Pxz) -- (Pz) -- cycle;
draw[fill=green,fill opacity=0.5] (Pz) -- (Pyz) -- (P) -- (Pxz) -- cycle;
draw[fill=red,fill opacity=0.5] (Px) -- (Pxy) -- (P) -- (Pxz) -- cycle;
draw[fill=magenta,fill opacity=0.5] (Py) -- (Pxy) -- (P) -- (Pyz) -- cycle;

DrawBoundingBox
end{tikzpicture}%
}%
end{document}


enter image description here






share|improve this answer
























  • Thanks. Good to know that it is an easy fix in the tikz-pgf code. Sadly have to wait a few minutes to accept the answer.

    – Peter Grill
    2 hours ago








  • 1





    the command is in tikz-3dplot, not tikz directly.

    – Ulrike Fischer
    1 hour ago














3












3








3







There are spurious spaces in the code. Notify the maintainer.



documentclass{article}
usepackage{tikz}
usepackage{tikz-3dplot}

newcommand*{DrawBoundingBox}[1]{%
draw [
draw=red, thick,
]
([shift={(-1pt,-1pt)}]current bounding box.south west) rectangle
([shift={(1pt,1pt)}]current bounding box.north east);
}
renewcommand{tdplotsetmaincoords}[2]{%
%perform some trig for the display transformation
%
%
%store the user-specified angles for possible future use
pgfmathsetmacro{tdplotmaintheta}{#1}% <------ changed
pgfmathsetmacro{tdplotmainphi}{#2}% <------- changed
%
%
tdplotcalctransformmainscreen
%
%now here is where the output is performed
tikzset{tdplot_main_coords/.style={x={(raarot cm,rbarot cm)},y={(rabrot cm, rbbrot cm)},z={(racrot cm, rbcrot cm)}}}%
}

begin{document}
fboxsep=0pt
fbox{%
%% code from https://tex.stackexchange.com/a/29342/4301
tdplotsetmaincoords{70}{115}%
%unskipunskip% <----- HACK which fixes the problem.
begin{tikzpicture}[scale=4,tdplot_main_coords]
coordinate (O) at (0,0,0);
tdplotsetcoord{P}{1.414213}{54.68636}{45}

draw[fill=gray!50,fill opacity=0.5] (O) -- (Py) -- (Pyz) -- (Pz) -- cycle;
draw[fill=blue,fill opacity=0.5] (O) -- (Px) -- (Pxy) -- (Py) -- cycle;
draw[fill=yellow,fill opacity=0.5] (O) -- (Px) -- (Pxz) -- (Pz) -- cycle;
draw[fill=green,fill opacity=0.5] (Pz) -- (Pyz) -- (P) -- (Pxz) -- cycle;
draw[fill=red,fill opacity=0.5] (Px) -- (Pxy) -- (P) -- (Pxz) -- cycle;
draw[fill=magenta,fill opacity=0.5] (Py) -- (Pxy) -- (P) -- (Pyz) -- cycle;

DrawBoundingBox
end{tikzpicture}%
}%
end{document}


enter image description here






share|improve this answer













There are spurious spaces in the code. Notify the maintainer.



documentclass{article}
usepackage{tikz}
usepackage{tikz-3dplot}

newcommand*{DrawBoundingBox}[1]{%
draw [
draw=red, thick,
]
([shift={(-1pt,-1pt)}]current bounding box.south west) rectangle
([shift={(1pt,1pt)}]current bounding box.north east);
}
renewcommand{tdplotsetmaincoords}[2]{%
%perform some trig for the display transformation
%
%
%store the user-specified angles for possible future use
pgfmathsetmacro{tdplotmaintheta}{#1}% <------ changed
pgfmathsetmacro{tdplotmainphi}{#2}% <------- changed
%
%
tdplotcalctransformmainscreen
%
%now here is where the output is performed
tikzset{tdplot_main_coords/.style={x={(raarot cm,rbarot cm)},y={(rabrot cm, rbbrot cm)},z={(racrot cm, rbcrot cm)}}}%
}

begin{document}
fboxsep=0pt
fbox{%
%% code from https://tex.stackexchange.com/a/29342/4301
tdplotsetmaincoords{70}{115}%
%unskipunskip% <----- HACK which fixes the problem.
begin{tikzpicture}[scale=4,tdplot_main_coords]
coordinate (O) at (0,0,0);
tdplotsetcoord{P}{1.414213}{54.68636}{45}

draw[fill=gray!50,fill opacity=0.5] (O) -- (Py) -- (Pyz) -- (Pz) -- cycle;
draw[fill=blue,fill opacity=0.5] (O) -- (Px) -- (Pxy) -- (Py) -- cycle;
draw[fill=yellow,fill opacity=0.5] (O) -- (Px) -- (Pxz) -- (Pz) -- cycle;
draw[fill=green,fill opacity=0.5] (Pz) -- (Pyz) -- (P) -- (Pxz) -- cycle;
draw[fill=red,fill opacity=0.5] (Px) -- (Pxy) -- (P) -- (Pxz) -- cycle;
draw[fill=magenta,fill opacity=0.5] (Py) -- (Pxy) -- (P) -- (Pyz) -- cycle;

DrawBoundingBox
end{tikzpicture}%
}%
end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 hours ago









Ulrike FischerUlrike Fischer

195k8302689




195k8302689













  • Thanks. Good to know that it is an easy fix in the tikz-pgf code. Sadly have to wait a few minutes to accept the answer.

    – Peter Grill
    2 hours ago








  • 1





    the command is in tikz-3dplot, not tikz directly.

    – Ulrike Fischer
    1 hour ago



















  • Thanks. Good to know that it is an easy fix in the tikz-pgf code. Sadly have to wait a few minutes to accept the answer.

    – Peter Grill
    2 hours ago








  • 1





    the command is in tikz-3dplot, not tikz directly.

    – Ulrike Fischer
    1 hour ago

















Thanks. Good to know that it is an easy fix in the tikz-pgf code. Sadly have to wait a few minutes to accept the answer.

– Peter Grill
2 hours ago







Thanks. Good to know that it is an easy fix in the tikz-pgf code. Sadly have to wait a few minutes to accept the answer.

– Peter Grill
2 hours ago






1




1





the command is in tikz-3dplot, not tikz directly.

– Ulrike Fischer
1 hour ago





the command is in tikz-3dplot, not tikz directly.

– Ulrike Fischer
1 hour ago


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479734%2fspurious-space-from-tdplotsetmaincoords%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)