How to move the pgf-spectra boxes in a TikZ

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















I am trying to draw a diagram that looks approximately like this:
enter image description here
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:



documentclassstandalone
usepackagetikz
usepackagepgf-spectra
usetikzlibrarydecorations.pathmorphing
tikzsetsnake it/.style=decorate, decoration=snake
begindocument
begintikzpicture
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
beginscopexshift=-4cm,yshift=1cm
pgfspectra[width=5cm]
endscope
endtikzpicture
enddocument


Here is the output it renders:



enter image description here










share|improve this question






















  • The package is actually nesting tikzpictures which may explain odd behavior.

    – TeXnician
    Jan 3 at 7:39












  • So one fix would be to use the pgfspectra as the main one and do all the rest of my drawing with respect to the zero point that pgfspectra sets? If that's the case, in my original question I wanted multiple pgfspectra bars at different locations in the one tikzpicture, is that possible?

    – sab hoque
    Jan 3 at 7:44











  • The package concept is flawed. I've added a workaround but it's not perfect. The best solution would be to contact the package author and show him your use case that his package does not support. Maybe he will provide an update.

    – TeXnician
    Jan 3 at 7:50











  • Can't you just put the spectra in saveboxes, which is the usual way to avoid nesting tikzpictures?

    – marmot
    Jan 3 at 10:39















1















I am trying to draw a diagram that looks approximately like this:
enter image description here
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:



documentclassstandalone
usepackagetikz
usepackagepgf-spectra
usetikzlibrarydecorations.pathmorphing
tikzsetsnake it/.style=decorate, decoration=snake
begindocument
begintikzpicture
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
beginscopexshift=-4cm,yshift=1cm
pgfspectra[width=5cm]
endscope
endtikzpicture
enddocument


Here is the output it renders:



enter image description here










share|improve this question






















  • The package is actually nesting tikzpictures which may explain odd behavior.

    – TeXnician
    Jan 3 at 7:39












  • So one fix would be to use the pgfspectra as the main one and do all the rest of my drawing with respect to the zero point that pgfspectra sets? If that's the case, in my original question I wanted multiple pgfspectra bars at different locations in the one tikzpicture, is that possible?

    – sab hoque
    Jan 3 at 7:44











  • The package concept is flawed. I've added a workaround but it's not perfect. The best solution would be to contact the package author and show him your use case that his package does not support. Maybe he will provide an update.

    – TeXnician
    Jan 3 at 7:50











  • Can't you just put the spectra in saveboxes, which is the usual way to avoid nesting tikzpictures?

    – marmot
    Jan 3 at 10:39













1












1








1


0






I am trying to draw a diagram that looks approximately like this:
enter image description here
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:



documentclassstandalone
usepackagetikz
usepackagepgf-spectra
usetikzlibrarydecorations.pathmorphing
tikzsetsnake it/.style=decorate, decoration=snake
begindocument
begintikzpicture
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
beginscopexshift=-4cm,yshift=1cm
pgfspectra[width=5cm]
endscope
endtikzpicture
enddocument


Here is the output it renders:



enter image description here










share|improve this question














I am trying to draw a diagram that looks approximately like this:
enter image description here
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:



documentclassstandalone
usepackagetikz
usepackagepgf-spectra
usetikzlibrarydecorations.pathmorphing
tikzsetsnake it/.style=decorate, decoration=snake
begindocument
begintikzpicture
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
beginscopexshift=-4cm,yshift=1cm
pgfspectra[width=5cm]
endscope
endtikzpicture
enddocument


Here is the output it renders:



enter image description here







tikz-pgf






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 3 at 7:31









sab hoquesab hoque

1,497318




1,497318












  • The package is actually nesting tikzpictures which may explain odd behavior.

    – TeXnician
    Jan 3 at 7:39












  • So one fix would be to use the pgfspectra as the main one and do all the rest of my drawing with respect to the zero point that pgfspectra sets? If that's the case, in my original question I wanted multiple pgfspectra bars at different locations in the one tikzpicture, is that possible?

    – sab hoque
    Jan 3 at 7:44











  • The package concept is flawed. I've added a workaround but it's not perfect. The best solution would be to contact the package author and show him your use case that his package does not support. Maybe he will provide an update.

    – TeXnician
    Jan 3 at 7:50











  • Can't you just put the spectra in saveboxes, which is the usual way to avoid nesting tikzpictures?

    – marmot
    Jan 3 at 10:39

















  • The package is actually nesting tikzpictures which may explain odd behavior.

    – TeXnician
    Jan 3 at 7:39












  • So one fix would be to use the pgfspectra as the main one and do all the rest of my drawing with respect to the zero point that pgfspectra sets? If that's the case, in my original question I wanted multiple pgfspectra bars at different locations in the one tikzpicture, is that possible?

    – sab hoque
    Jan 3 at 7:44











  • The package concept is flawed. I've added a workaround but it's not perfect. The best solution would be to contact the package author and show him your use case that his package does not support. Maybe he will provide an update.

    – TeXnician
    Jan 3 at 7:50











  • Can't you just put the spectra in saveboxes, which is the usual way to avoid nesting tikzpictures?

    – marmot
    Jan 3 at 10:39
















The package is actually nesting tikzpictures which may explain odd behavior.

– TeXnician
Jan 3 at 7:39






The package is actually nesting tikzpictures which may explain odd behavior.

– TeXnician
Jan 3 at 7:39














So one fix would be to use the pgfspectra as the main one and do all the rest of my drawing with respect to the zero point that pgfspectra sets? If that's the case, in my original question I wanted multiple pgfspectra bars at different locations in the one tikzpicture, is that possible?

– sab hoque
Jan 3 at 7:44





So one fix would be to use the pgfspectra as the main one and do all the rest of my drawing with respect to the zero point that pgfspectra sets? If that's the case, in my original question I wanted multiple pgfspectra bars at different locations in the one tikzpicture, is that possible?

– sab hoque
Jan 3 at 7:44













The package concept is flawed. I've added a workaround but it's not perfect. The best solution would be to contact the package author and show him your use case that his package does not support. Maybe he will provide an update.

– TeXnician
Jan 3 at 7:50





The package concept is flawed. I've added a workaround but it's not perfect. The best solution would be to contact the package author and show him your use case that his package does not support. Maybe he will provide an update.

– TeXnician
Jan 3 at 7:50













Can't you just put the spectra in saveboxes, which is the usual way to avoid nesting tikzpictures?

– marmot
Jan 3 at 10:39





Can't you just put the spectra in saveboxes, which is the usual way to avoid nesting tikzpictures?

– marmot
Jan 3 at 10:39










2 Answers
2






active

oldest

votes


















2















WARNING: This is a workaround for a simple use case. It does not provide any of the complex options the package will offer. If you wanted these, the package would need to be fixed.




With a bit of reverse engineering you can get something like the following. It copies some internal parts from pgf-spectra to avoid nesting tikzpictures which are preventing your scope from shifting. You may still set width and height keys.



pgf-spectra



documentclassarticle
usepackagetikz
usepackagepgf-spectra
usetikzlibrarydecorations.pathmorphing
tikzsetsnake it/.style=decorate, decoration=snake
begindocument
begintikzpicture
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);
makeatletter
beginscope[shift=(-10cm,.5cm)]
% adapted from pgf-spectra.sty
pgfkeys/wl/.cd,width=5cm,height=1cm
foreach x in 380,...,780%
%
pgfmathparsewlwidth/(abs(wlend-wlbegin))edefxscalepgfmathresult
edefwl@linewidthxscale pt
wlcolorx%
pgfmathparse(x-380)*xscaleedefwl@currentxpgfmathresult pt%
draw[wltemp,line width=wl@linewidth] (wl@currentx,0) -- ++(0,wlheight);%
%
endscope
makeatother
endtikzpicture
enddocument





share|improve this answer

























  • Hmm. I will try to copy some code from the internal code and see if I can get the other settings (like absorption lines and start and end) Thanks for the help.

    – sab hoque
    Jan 3 at 7:53











  • I can't seem to find the code that specifies the line width and specific emission lines in the internal code, could you tell me which line numbers they are or make an edit?

    – sab hoque
    Jan 3 at 8:08






  • 1





    @sabhoque Probably somewhere near all those auxiliary functions at the end but as I said this is more of a workaround because the package concept is bad. If you want to get all of its features you should consider returning to the package's syntax, position them with means like parboxes and then use overlays to get the connections.

    – TeXnician
    Jan 3 at 8:16











  • Did exactly that see below

    – sab hoque
    Jan 3 at 9:02






  • 1





    @sabhoque Above (+1) ;)

    – TeXnician
    Jan 3 at 9:06


















2














I have made a workaround using TeXnician's suggestions:



documentclassarticle
usepackagetikz
usepackagepgf-spectra
usetikzlibrarydecorations.pathmorphing
tikzsetsnake it/.style=decorate, decoration=snake
begindocument
setlengthunitlength1cm
thicklines
beginpicture(0,0)
put(-5,2.5) parbox4cmpgfspectra[lines=390,490,540,690,absorption,height=0.5cm,width=5cm]
put(-5,2) parbox4cmpgfspectra[lines=395,495,545,695,absorption,height=0.5cm,width=5cm]
put(-5,1.5) parbox4cmpgfspectra[lines=400,500,550,700,absorption,height=0.5cm,width=5cm]
put(-5,1) parbox4cmpgfspectra[lines=405,505,555,705,absorption,height=0.5cm,width=5cm]
put(-5,0.5) parbox4cmpgfspectra[lines=410,510,560,710,absorption,height=0.5cm,width=5cm]
put(-5,-0.5) parbox14cmpgfspectra[lines=400,500,550,700,absorption,height=0.5cm,width=5cm,line width=4pt]
endpicture
begintikzpicture
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);
endtikzpicture
tikz[overlay,remember picture]node at (-2.8,-0.5) Widening of absorption lines;
enddocument


enter image description here






share|improve this answer






















    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%2f468364%2fhow-to-move-the-pgf-spectra-boxes-in-a-tikz%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2















    WARNING: This is a workaround for a simple use case. It does not provide any of the complex options the package will offer. If you wanted these, the package would need to be fixed.




    With a bit of reverse engineering you can get something like the following. It copies some internal parts from pgf-spectra to avoid nesting tikzpictures which are preventing your scope from shifting. You may still set width and height keys.



    pgf-spectra



    documentclassarticle
    usepackagetikz
    usepackagepgf-spectra
    usetikzlibrarydecorations.pathmorphing
    tikzsetsnake it/.style=decorate, decoration=snake
    begindocument
    begintikzpicture
    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);
    makeatletter
    beginscope[shift=(-10cm,.5cm)]
    % adapted from pgf-spectra.sty
    pgfkeys/wl/.cd,width=5cm,height=1cm
    foreach x in 380,...,780%
    %
    pgfmathparsewlwidth/(abs(wlend-wlbegin))edefxscalepgfmathresult
    edefwl@linewidthxscale pt
    wlcolorx%
    pgfmathparse(x-380)*xscaleedefwl@currentxpgfmathresult pt%
    draw[wltemp,line width=wl@linewidth] (wl@currentx,0) -- ++(0,wlheight);%
    %
    endscope
    makeatother
    endtikzpicture
    enddocument





    share|improve this answer

























    • Hmm. I will try to copy some code from the internal code and see if I can get the other settings (like absorption lines and start and end) Thanks for the help.

      – sab hoque
      Jan 3 at 7:53











    • I can't seem to find the code that specifies the line width and specific emission lines in the internal code, could you tell me which line numbers they are or make an edit?

      – sab hoque
      Jan 3 at 8:08






    • 1





      @sabhoque Probably somewhere near all those auxiliary functions at the end but as I said this is more of a workaround because the package concept is bad. If you want to get all of its features you should consider returning to the package's syntax, position them with means like parboxes and then use overlays to get the connections.

      – TeXnician
      Jan 3 at 8:16











    • Did exactly that see below

      – sab hoque
      Jan 3 at 9:02






    • 1





      @sabhoque Above (+1) ;)

      – TeXnician
      Jan 3 at 9:06















    2















    WARNING: This is a workaround for a simple use case. It does not provide any of the complex options the package will offer. If you wanted these, the package would need to be fixed.




    With a bit of reverse engineering you can get something like the following. It copies some internal parts from pgf-spectra to avoid nesting tikzpictures which are preventing your scope from shifting. You may still set width and height keys.



    pgf-spectra



    documentclassarticle
    usepackagetikz
    usepackagepgf-spectra
    usetikzlibrarydecorations.pathmorphing
    tikzsetsnake it/.style=decorate, decoration=snake
    begindocument
    begintikzpicture
    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);
    makeatletter
    beginscope[shift=(-10cm,.5cm)]
    % adapted from pgf-spectra.sty
    pgfkeys/wl/.cd,width=5cm,height=1cm
    foreach x in 380,...,780%
    %
    pgfmathparsewlwidth/(abs(wlend-wlbegin))edefxscalepgfmathresult
    edefwl@linewidthxscale pt
    wlcolorx%
    pgfmathparse(x-380)*xscaleedefwl@currentxpgfmathresult pt%
    draw[wltemp,line width=wl@linewidth] (wl@currentx,0) -- ++(0,wlheight);%
    %
    endscope
    makeatother
    endtikzpicture
    enddocument





    share|improve this answer

























    • Hmm. I will try to copy some code from the internal code and see if I can get the other settings (like absorption lines and start and end) Thanks for the help.

      – sab hoque
      Jan 3 at 7:53











    • I can't seem to find the code that specifies the line width and specific emission lines in the internal code, could you tell me which line numbers they are or make an edit?

      – sab hoque
      Jan 3 at 8:08






    • 1





      @sabhoque Probably somewhere near all those auxiliary functions at the end but as I said this is more of a workaround because the package concept is bad. If you want to get all of its features you should consider returning to the package's syntax, position them with means like parboxes and then use overlays to get the connections.

      – TeXnician
      Jan 3 at 8:16











    • Did exactly that see below

      – sab hoque
      Jan 3 at 9:02






    • 1





      @sabhoque Above (+1) ;)

      – TeXnician
      Jan 3 at 9:06













    2












    2








    2








    WARNING: This is a workaround for a simple use case. It does not provide any of the complex options the package will offer. If you wanted these, the package would need to be fixed.




    With a bit of reverse engineering you can get something like the following. It copies some internal parts from pgf-spectra to avoid nesting tikzpictures which are preventing your scope from shifting. You may still set width and height keys.



    pgf-spectra



    documentclassarticle
    usepackagetikz
    usepackagepgf-spectra
    usetikzlibrarydecorations.pathmorphing
    tikzsetsnake it/.style=decorate, decoration=snake
    begindocument
    begintikzpicture
    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);
    makeatletter
    beginscope[shift=(-10cm,.5cm)]
    % adapted from pgf-spectra.sty
    pgfkeys/wl/.cd,width=5cm,height=1cm
    foreach x in 380,...,780%
    %
    pgfmathparsewlwidth/(abs(wlend-wlbegin))edefxscalepgfmathresult
    edefwl@linewidthxscale pt
    wlcolorx%
    pgfmathparse(x-380)*xscaleedefwl@currentxpgfmathresult pt%
    draw[wltemp,line width=wl@linewidth] (wl@currentx,0) -- ++(0,wlheight);%
    %
    endscope
    makeatother
    endtikzpicture
    enddocument





    share|improve this answer
















    WARNING: This is a workaround for a simple use case. It does not provide any of the complex options the package will offer. If you wanted these, the package would need to be fixed.




    With a bit of reverse engineering you can get something like the following. It copies some internal parts from pgf-spectra to avoid nesting tikzpictures which are preventing your scope from shifting. You may still set width and height keys.



    pgf-spectra



    documentclassarticle
    usepackagetikz
    usepackagepgf-spectra
    usetikzlibrarydecorations.pathmorphing
    tikzsetsnake it/.style=decorate, decoration=snake
    begindocument
    begintikzpicture
    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);
    makeatletter
    beginscope[shift=(-10cm,.5cm)]
    % adapted from pgf-spectra.sty
    pgfkeys/wl/.cd,width=5cm,height=1cm
    foreach x in 380,...,780%
    %
    pgfmathparsewlwidth/(abs(wlend-wlbegin))edefxscalepgfmathresult
    edefwl@linewidthxscale pt
    wlcolorx%
    pgfmathparse(x-380)*xscaleedefwl@currentxpgfmathresult pt%
    draw[wltemp,line width=wl@linewidth] (wl@currentx,0) -- ++(0,wlheight);%
    %
    endscope
    makeatother
    endtikzpicture
    enddocument






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jan 3 at 8:17

























    answered Jan 3 at 7:48









    TeXnicianTeXnician

    24.7k63187




    24.7k63187












    • Hmm. I will try to copy some code from the internal code and see if I can get the other settings (like absorption lines and start and end) Thanks for the help.

      – sab hoque
      Jan 3 at 7:53











    • I can't seem to find the code that specifies the line width and specific emission lines in the internal code, could you tell me which line numbers they are or make an edit?

      – sab hoque
      Jan 3 at 8:08






    • 1





      @sabhoque Probably somewhere near all those auxiliary functions at the end but as I said this is more of a workaround because the package concept is bad. If you want to get all of its features you should consider returning to the package's syntax, position them with means like parboxes and then use overlays to get the connections.

      – TeXnician
      Jan 3 at 8:16











    • Did exactly that see below

      – sab hoque
      Jan 3 at 9:02






    • 1





      @sabhoque Above (+1) ;)

      – TeXnician
      Jan 3 at 9:06

















    • Hmm. I will try to copy some code from the internal code and see if I can get the other settings (like absorption lines and start and end) Thanks for the help.

      – sab hoque
      Jan 3 at 7:53











    • I can't seem to find the code that specifies the line width and specific emission lines in the internal code, could you tell me which line numbers they are or make an edit?

      – sab hoque
      Jan 3 at 8:08






    • 1





      @sabhoque Probably somewhere near all those auxiliary functions at the end but as I said this is more of a workaround because the package concept is bad. If you want to get all of its features you should consider returning to the package's syntax, position them with means like parboxes and then use overlays to get the connections.

      – TeXnician
      Jan 3 at 8:16











    • Did exactly that see below

      – sab hoque
      Jan 3 at 9:02






    • 1





      @sabhoque Above (+1) ;)

      – TeXnician
      Jan 3 at 9:06
















    Hmm. I will try to copy some code from the internal code and see if I can get the other settings (like absorption lines and start and end) Thanks for the help.

    – sab hoque
    Jan 3 at 7:53





    Hmm. I will try to copy some code from the internal code and see if I can get the other settings (like absorption lines and start and end) Thanks for the help.

    – sab hoque
    Jan 3 at 7:53













    I can't seem to find the code that specifies the line width and specific emission lines in the internal code, could you tell me which line numbers they are or make an edit?

    – sab hoque
    Jan 3 at 8:08





    I can't seem to find the code that specifies the line width and specific emission lines in the internal code, could you tell me which line numbers they are or make an edit?

    – sab hoque
    Jan 3 at 8:08




    1




    1





    @sabhoque Probably somewhere near all those auxiliary functions at the end but as I said this is more of a workaround because the package concept is bad. If you want to get all of its features you should consider returning to the package's syntax, position them with means like parboxes and then use overlays to get the connections.

    – TeXnician
    Jan 3 at 8:16





    @sabhoque Probably somewhere near all those auxiliary functions at the end but as I said this is more of a workaround because the package concept is bad. If you want to get all of its features you should consider returning to the package's syntax, position them with means like parboxes and then use overlays to get the connections.

    – TeXnician
    Jan 3 at 8:16













    Did exactly that see below

    – sab hoque
    Jan 3 at 9:02





    Did exactly that see below

    – sab hoque
    Jan 3 at 9:02




    1




    1





    @sabhoque Above (+1) ;)

    – TeXnician
    Jan 3 at 9:06





    @sabhoque Above (+1) ;)

    – TeXnician
    Jan 3 at 9:06











    2














    I have made a workaround using TeXnician's suggestions:



    documentclassarticle
    usepackagetikz
    usepackagepgf-spectra
    usetikzlibrarydecorations.pathmorphing
    tikzsetsnake it/.style=decorate, decoration=snake
    begindocument
    setlengthunitlength1cm
    thicklines
    beginpicture(0,0)
    put(-5,2.5) parbox4cmpgfspectra[lines=390,490,540,690,absorption,height=0.5cm,width=5cm]
    put(-5,2) parbox4cmpgfspectra[lines=395,495,545,695,absorption,height=0.5cm,width=5cm]
    put(-5,1.5) parbox4cmpgfspectra[lines=400,500,550,700,absorption,height=0.5cm,width=5cm]
    put(-5,1) parbox4cmpgfspectra[lines=405,505,555,705,absorption,height=0.5cm,width=5cm]
    put(-5,0.5) parbox4cmpgfspectra[lines=410,510,560,710,absorption,height=0.5cm,width=5cm]
    put(-5,-0.5) parbox14cmpgfspectra[lines=400,500,550,700,absorption,height=0.5cm,width=5cm,line width=4pt]
    endpicture
    begintikzpicture
    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);
    endtikzpicture
    tikz[overlay,remember picture]node at (-2.8,-0.5) Widening of absorption lines;
    enddocument


    enter image description here






    share|improve this answer



























      2














      I have made a workaround using TeXnician's suggestions:



      documentclassarticle
      usepackagetikz
      usepackagepgf-spectra
      usetikzlibrarydecorations.pathmorphing
      tikzsetsnake it/.style=decorate, decoration=snake
      begindocument
      setlengthunitlength1cm
      thicklines
      beginpicture(0,0)
      put(-5,2.5) parbox4cmpgfspectra[lines=390,490,540,690,absorption,height=0.5cm,width=5cm]
      put(-5,2) parbox4cmpgfspectra[lines=395,495,545,695,absorption,height=0.5cm,width=5cm]
      put(-5,1.5) parbox4cmpgfspectra[lines=400,500,550,700,absorption,height=0.5cm,width=5cm]
      put(-5,1) parbox4cmpgfspectra[lines=405,505,555,705,absorption,height=0.5cm,width=5cm]
      put(-5,0.5) parbox4cmpgfspectra[lines=410,510,560,710,absorption,height=0.5cm,width=5cm]
      put(-5,-0.5) parbox14cmpgfspectra[lines=400,500,550,700,absorption,height=0.5cm,width=5cm,line width=4pt]
      endpicture
      begintikzpicture
      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);
      endtikzpicture
      tikz[overlay,remember picture]node at (-2.8,-0.5) Widening of absorption lines;
      enddocument


      enter image description here






      share|improve this answer

























        2












        2








        2







        I have made a workaround using TeXnician's suggestions:



        documentclassarticle
        usepackagetikz
        usepackagepgf-spectra
        usetikzlibrarydecorations.pathmorphing
        tikzsetsnake it/.style=decorate, decoration=snake
        begindocument
        setlengthunitlength1cm
        thicklines
        beginpicture(0,0)
        put(-5,2.5) parbox4cmpgfspectra[lines=390,490,540,690,absorption,height=0.5cm,width=5cm]
        put(-5,2) parbox4cmpgfspectra[lines=395,495,545,695,absorption,height=0.5cm,width=5cm]
        put(-5,1.5) parbox4cmpgfspectra[lines=400,500,550,700,absorption,height=0.5cm,width=5cm]
        put(-5,1) parbox4cmpgfspectra[lines=405,505,555,705,absorption,height=0.5cm,width=5cm]
        put(-5,0.5) parbox4cmpgfspectra[lines=410,510,560,710,absorption,height=0.5cm,width=5cm]
        put(-5,-0.5) parbox14cmpgfspectra[lines=400,500,550,700,absorption,height=0.5cm,width=5cm,line width=4pt]
        endpicture
        begintikzpicture
        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);
        endtikzpicture
        tikz[overlay,remember picture]node at (-2.8,-0.5) Widening of absorption lines;
        enddocument


        enter image description here






        share|improve this answer













        I have made a workaround using TeXnician's suggestions:



        documentclassarticle
        usepackagetikz
        usepackagepgf-spectra
        usetikzlibrarydecorations.pathmorphing
        tikzsetsnake it/.style=decorate, decoration=snake
        begindocument
        setlengthunitlength1cm
        thicklines
        beginpicture(0,0)
        put(-5,2.5) parbox4cmpgfspectra[lines=390,490,540,690,absorption,height=0.5cm,width=5cm]
        put(-5,2) parbox4cmpgfspectra[lines=395,495,545,695,absorption,height=0.5cm,width=5cm]
        put(-5,1.5) parbox4cmpgfspectra[lines=400,500,550,700,absorption,height=0.5cm,width=5cm]
        put(-5,1) parbox4cmpgfspectra[lines=405,505,555,705,absorption,height=0.5cm,width=5cm]
        put(-5,0.5) parbox4cmpgfspectra[lines=410,510,560,710,absorption,height=0.5cm,width=5cm]
        put(-5,-0.5) parbox14cmpgfspectra[lines=400,500,550,700,absorption,height=0.5cm,width=5cm,line width=4pt]
        endpicture
        begintikzpicture
        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);
        endtikzpicture
        tikz[overlay,remember picture]node at (-2.8,-0.5) Widening of absorption lines;
        enddocument


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 3 at 9:02









        sab hoquesab hoque

        1,497318




        1,497318



























            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%2f468364%2fhow-to-move-the-pgf-spectra-boxes-in-a-tikz%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

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay