How to move the pgf-spectra boxes in a TikZ
I am trying to draw a diagram that looks approximately like this:
The red boxes are the items I would like to add to the diagram. They represent spectra lines that can be generated using the pgf-spectra
package (https://ctan.org/pkg/pgf-spectra?lang=en). When I try to use a scope to move the box like in my not working example below, the spectra box is not moved. I was wondering if it were possible to move the spectra boxes at all, either in the document or by changing code in the package .sty
files
My MNWE:
documentclass{standalone}
usepackage{tikz}
usepackage{pgf-spectra}
usetikzlibrary{decorations.pathmorphing}
tikzset{snake it/.style={decorate, decoration=snake}}
begin{document}
begin{tikzpicture}
draw[-latex] (0,0) ++ (60:1.5) arc (60:120:1.5);
draw[-latex] (0,0) ++ (-120:1.5) arc (-120:-60:1.5);
draw[snake it,blue,-latex,thick] (0,1) -- (-4,1);
draw[snake it,red,-latex,thick] (0,-1) -- (-4,-1);
draw[snake it,-latex,thick] (-1,0) -- (-4,0);
draw[fill=yellow!50] (0,0) circle (1);
% -- this part below is what I want to move but it does not behave correctly
begin{scope}{xshift=-4cm,yshift=1cm}
pgfspectra[width=5cm]
end{scope}
end{tikzpicture}
end{document}
Here is the output it renders:
tikz-pgf
add a comment |
I am trying to draw a diagram that looks approximately like this:
The red boxes are the items I would like to add to the diagram. They represent spectra lines that can be generated using the pgf-spectra
package (https://ctan.org/pkg/pgf-spectra?lang=en). When I try to use a scope to move the box like in my not working example below, the spectra box is not moved. I was wondering if it were possible to move the spectra boxes at all, either in the document or by changing code in the package .sty
files
My MNWE:
documentclass{standalone}
usepackage{tikz}
usepackage{pgf-spectra}
usetikzlibrary{decorations.pathmorphing}
tikzset{snake it/.style={decorate, decoration=snake}}
begin{document}
begin{tikzpicture}
draw[-latex] (0,0) ++ (60:1.5) arc (60:120:1.5);
draw[-latex] (0,0) ++ (-120:1.5) arc (-120:-60:1.5);
draw[snake it,blue,-latex,thick] (0,1) -- (-4,1);
draw[snake it,red,-latex,thick] (0,-1) -- (-4,-1);
draw[snake it,-latex,thick] (-1,0) -- (-4,0);
draw[fill=yellow!50] (0,0) circle (1);
% -- this part below is what I want to move but it does not behave correctly
begin{scope}{xshift=-4cm,yshift=1cm}
pgfspectra[width=5cm]
end{scope}
end{tikzpicture}
end{document}
Here is the output it renders:
tikz-pgf
The package is actually nesting tikzpictures which may explain odd behavior.
– TeXnician
2 mins ago
add a comment |
I am trying to draw a diagram that looks approximately like this:
The red boxes are the items I would like to add to the diagram. They represent spectra lines that can be generated using the pgf-spectra
package (https://ctan.org/pkg/pgf-spectra?lang=en). When I try to use a scope to move the box like in my not working example below, the spectra box is not moved. I was wondering if it were possible to move the spectra boxes at all, either in the document or by changing code in the package .sty
files
My MNWE:
documentclass{standalone}
usepackage{tikz}
usepackage{pgf-spectra}
usetikzlibrary{decorations.pathmorphing}
tikzset{snake it/.style={decorate, decoration=snake}}
begin{document}
begin{tikzpicture}
draw[-latex] (0,0) ++ (60:1.5) arc (60:120:1.5);
draw[-latex] (0,0) ++ (-120:1.5) arc (-120:-60:1.5);
draw[snake it,blue,-latex,thick] (0,1) -- (-4,1);
draw[snake it,red,-latex,thick] (0,-1) -- (-4,-1);
draw[snake it,-latex,thick] (-1,0) -- (-4,0);
draw[fill=yellow!50] (0,0) circle (1);
% -- this part below is what I want to move but it does not behave correctly
begin{scope}{xshift=-4cm,yshift=1cm}
pgfspectra[width=5cm]
end{scope}
end{tikzpicture}
end{document}
Here is the output it renders:
tikz-pgf
I am trying to draw a diagram that looks approximately like this:
The red boxes are the items I would like to add to the diagram. They represent spectra lines that can be generated using the pgf-spectra
package (https://ctan.org/pkg/pgf-spectra?lang=en). When I try to use a scope to move the box like in my not working example below, the spectra box is not moved. I was wondering if it were possible to move the spectra boxes at all, either in the document or by changing code in the package .sty
files
My MNWE:
documentclass{standalone}
usepackage{tikz}
usepackage{pgf-spectra}
usetikzlibrary{decorations.pathmorphing}
tikzset{snake it/.style={decorate, decoration=snake}}
begin{document}
begin{tikzpicture}
draw[-latex] (0,0) ++ (60:1.5) arc (60:120:1.5);
draw[-latex] (0,0) ++ (-120:1.5) arc (-120:-60:1.5);
draw[snake it,blue,-latex,thick] (0,1) -- (-4,1);
draw[snake it,red,-latex,thick] (0,-1) -- (-4,-1);
draw[snake it,-latex,thick] (-1,0) -- (-4,0);
draw[fill=yellow!50] (0,0) circle (1);
% -- this part below is what I want to move but it does not behave correctly
begin{scope}{xshift=-4cm,yshift=1cm}
pgfspectra[width=5cm]
end{scope}
end{tikzpicture}
end{document}
Here is the output it renders:
tikz-pgf
tikz-pgf
asked 10 mins ago
sab hoque
1,259318
1,259318
The package is actually nesting tikzpictures which may explain odd behavior.
– TeXnician
2 mins ago
add a comment |
The package is actually nesting tikzpictures which may explain odd behavior.
– TeXnician
2 mins ago
The package is actually nesting tikzpictures which may explain odd behavior.
– TeXnician
2 mins ago
The package is actually nesting tikzpictures which may explain odd behavior.
– TeXnician
2 mins ago
add a comment |
0
active
oldest
votes
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f468364%2fhow-to-move-the-pgf-spectra-boxes-in-a-tikz%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f468364%2fhow-to-move-the-pgf-spectra-boxes-in-a-tikz%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
The package is actually nesting tikzpictures which may explain odd behavior.
– TeXnician
2 mins ago