The horizontal key displays in vertical in GNUPLOT










1















In gnuplot, I used the horizontal key, but it shows me vertical on the output screen. I tried every alternative but found difficult to do that.



set terminal wxt size 600,600 enhanced font 'times new roman,10' persist
set xlabel "X-Axis"
set ylabel "Y-Axis"
set multiplot layout 2,3
set key box
set key horiz
set key at screen 0.5, 0.40
set title "1st"
set xrange [0:20]
plot tan((pi/180)*x) title "Analytical" w l ls 1,
tan(2*(pi/180)*x) title "Observed" w lp ls 2,
tan(3*(pi/180)*x) title "Experimental" w lp ls 3

set title "2nd"
set xrange [0:20]
plot tan((pi/180)*x) title "Analytical" w l ls 1,
tan(2*(pi/180)*x) title "Observed" w lp ls 2,
tan(3*(pi/180)*x) title "Experimental" w lp ls 3

set title "3rd"
set xrange [0:20]
plot tan((pi/180)*x) title "Analytical" w l ls 1,
tan(2*(pi/180)*x) title "Observed" w lp ls 2,
tan(3*(pi/180)*x) title "Experimental" w lp ls 3

unset multiplot


Is there any alternative possible?? See the plot by click on the output below:



enter image description here










share|improve this question




























    1















    In gnuplot, I used the horizontal key, but it shows me vertical on the output screen. I tried every alternative but found difficult to do that.



    set terminal wxt size 600,600 enhanced font 'times new roman,10' persist
    set xlabel "X-Axis"
    set ylabel "Y-Axis"
    set multiplot layout 2,3
    set key box
    set key horiz
    set key at screen 0.5, 0.40
    set title "1st"
    set xrange [0:20]
    plot tan((pi/180)*x) title "Analytical" w l ls 1,
    tan(2*(pi/180)*x) title "Observed" w lp ls 2,
    tan(3*(pi/180)*x) title "Experimental" w lp ls 3

    set title "2nd"
    set xrange [0:20]
    plot tan((pi/180)*x) title "Analytical" w l ls 1,
    tan(2*(pi/180)*x) title "Observed" w lp ls 2,
    tan(3*(pi/180)*x) title "Experimental" w lp ls 3

    set title "3rd"
    set xrange [0:20]
    plot tan((pi/180)*x) title "Analytical" w l ls 1,
    tan(2*(pi/180)*x) title "Observed" w lp ls 2,
    tan(3*(pi/180)*x) title "Experimental" w lp ls 3

    unset multiplot


    Is there any alternative possible?? See the plot by click on the output below:



    enter image description here










    share|improve this question


























      1












      1








      1








      In gnuplot, I used the horizontal key, but it shows me vertical on the output screen. I tried every alternative but found difficult to do that.



      set terminal wxt size 600,600 enhanced font 'times new roman,10' persist
      set xlabel "X-Axis"
      set ylabel "Y-Axis"
      set multiplot layout 2,3
      set key box
      set key horiz
      set key at screen 0.5, 0.40
      set title "1st"
      set xrange [0:20]
      plot tan((pi/180)*x) title "Analytical" w l ls 1,
      tan(2*(pi/180)*x) title "Observed" w lp ls 2,
      tan(3*(pi/180)*x) title "Experimental" w lp ls 3

      set title "2nd"
      set xrange [0:20]
      plot tan((pi/180)*x) title "Analytical" w l ls 1,
      tan(2*(pi/180)*x) title "Observed" w lp ls 2,
      tan(3*(pi/180)*x) title "Experimental" w lp ls 3

      set title "3rd"
      set xrange [0:20]
      plot tan((pi/180)*x) title "Analytical" w l ls 1,
      tan(2*(pi/180)*x) title "Observed" w lp ls 2,
      tan(3*(pi/180)*x) title "Experimental" w lp ls 3

      unset multiplot


      Is there any alternative possible?? See the plot by click on the output below:



      enter image description here










      share|improve this question
















      In gnuplot, I used the horizontal key, but it shows me vertical on the output screen. I tried every alternative but found difficult to do that.



      set terminal wxt size 600,600 enhanced font 'times new roman,10' persist
      set xlabel "X-Axis"
      set ylabel "Y-Axis"
      set multiplot layout 2,3
      set key box
      set key horiz
      set key at screen 0.5, 0.40
      set title "1st"
      set xrange [0:20]
      plot tan((pi/180)*x) title "Analytical" w l ls 1,
      tan(2*(pi/180)*x) title "Observed" w lp ls 2,
      tan(3*(pi/180)*x) title "Experimental" w lp ls 3

      set title "2nd"
      set xrange [0:20]
      plot tan((pi/180)*x) title "Analytical" w l ls 1,
      tan(2*(pi/180)*x) title "Observed" w lp ls 2,
      tan(3*(pi/180)*x) title "Experimental" w lp ls 3

      set title "3rd"
      set xrange [0:20]
      plot tan((pi/180)*x) title "Analytical" w l ls 1,
      tan(2*(pi/180)*x) title "Observed" w lp ls 2,
      tan(3*(pi/180)*x) title "Experimental" w lp ls 3

      unset multiplot


      Is there any alternative possible?? See the plot by click on the output below:



      enter image description here







      gnuplot






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 23 '18 at 14:40









      Cœur

      18.4k9109148




      18.4k9109148










      asked May 16 '18 at 10:44









      Deepti Ranjan MajhiDeepti Ranjan Majhi

      83




      83






















          2 Answers
          2






          active

          oldest

          votes


















          1














          You can force the legend to consist of a single row by specifying set key vertical maxrows 1:



          set xlabel "X-Axis"
          set ylabel "Y-Axis"
          set multiplot layout 2,3
          set key at screen 0.5, 0.40 center vertical height 1 box maxrows 1
          set title "1st"
          set xrange [0:20]
          plot tan((pi/180)*x) title "Analytical" w l ls 1,
          tan(2*(pi/180)*x) title "Observed" w lp ls 2,
          tan(3*(pi/180)*x) title "Experimental" w lp ls 3

          set title "2nd"
          set xrange [0:20]
          plot tan((pi/180)*x) title "Analytical" w l ls 1,
          tan(2*(pi/180)*x) title "Observed" w lp ls 2,
          tan(3*(pi/180)*x) title "Experimental" w lp ls 3

          set title "3rd"
          set xrange [0:20]
          plot tan((pi/180)*x) title "Analytical" w l ls 1,
          tan(2*(pi/180)*x) title "Observed" w lp ls 2,
          tan(3*(pi/180)*x) title "Experimental" w lp ls 3

          unset multiplot


          enter image description here






          share|improve this answer






























            0














            Each of your 3 plots generates a separate key. The multiplot layout places all 3 plots on the same page, but still each one is only 1/3 of the page in width and that sets the maximum horizontal size of its key. In the example you re-position each key to the same place at the bottom of the page so that they lie exactly on top of each other. This does not change their size or shape, only their position.



            What you can do instead is to manually place each title on the page without reference to the auto-generated key. In order to leave room for the manually placed key entries you can give explicit multiplot layout margins.



            set multiplot layout 1,3 margins .1, .9, .3, .9
            set key
            plot tan((pi/180)*x) title "Analytical" at screen .25,.1 w l ls 1,
            tan(2*(pi/180)*x) title "Observed" at screen .50,.1 w lp ls 2 ,
            tan(3*(pi/180)*x) title "Experimental" at screen .75,.1 w lp ls 3
            unset key
            plot ...
            plot ...
            unset multiplot


            Placing a box around the manually positioned titles is a separate question.






            share|improve this answer






















              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              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: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              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%2fstackoverflow.com%2fquestions%2f50368785%2fthe-horizontal-key-displays-in-vertical-in-gnuplot%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









              1














              You can force the legend to consist of a single row by specifying set key vertical maxrows 1:



              set xlabel "X-Axis"
              set ylabel "Y-Axis"
              set multiplot layout 2,3
              set key at screen 0.5, 0.40 center vertical height 1 box maxrows 1
              set title "1st"
              set xrange [0:20]
              plot tan((pi/180)*x) title "Analytical" w l ls 1,
              tan(2*(pi/180)*x) title "Observed" w lp ls 2,
              tan(3*(pi/180)*x) title "Experimental" w lp ls 3

              set title "2nd"
              set xrange [0:20]
              plot tan((pi/180)*x) title "Analytical" w l ls 1,
              tan(2*(pi/180)*x) title "Observed" w lp ls 2,
              tan(3*(pi/180)*x) title "Experimental" w lp ls 3

              set title "3rd"
              set xrange [0:20]
              plot tan((pi/180)*x) title "Analytical" w l ls 1,
              tan(2*(pi/180)*x) title "Observed" w lp ls 2,
              tan(3*(pi/180)*x) title "Experimental" w lp ls 3

              unset multiplot


              enter image description here






              share|improve this answer



























                1














                You can force the legend to consist of a single row by specifying set key vertical maxrows 1:



                set xlabel "X-Axis"
                set ylabel "Y-Axis"
                set multiplot layout 2,3
                set key at screen 0.5, 0.40 center vertical height 1 box maxrows 1
                set title "1st"
                set xrange [0:20]
                plot tan((pi/180)*x) title "Analytical" w l ls 1,
                tan(2*(pi/180)*x) title "Observed" w lp ls 2,
                tan(3*(pi/180)*x) title "Experimental" w lp ls 3

                set title "2nd"
                set xrange [0:20]
                plot tan((pi/180)*x) title "Analytical" w l ls 1,
                tan(2*(pi/180)*x) title "Observed" w lp ls 2,
                tan(3*(pi/180)*x) title "Experimental" w lp ls 3

                set title "3rd"
                set xrange [0:20]
                plot tan((pi/180)*x) title "Analytical" w l ls 1,
                tan(2*(pi/180)*x) title "Observed" w lp ls 2,
                tan(3*(pi/180)*x) title "Experimental" w lp ls 3

                unset multiplot


                enter image description here






                share|improve this answer

























                  1












                  1








                  1







                  You can force the legend to consist of a single row by specifying set key vertical maxrows 1:



                  set xlabel "X-Axis"
                  set ylabel "Y-Axis"
                  set multiplot layout 2,3
                  set key at screen 0.5, 0.40 center vertical height 1 box maxrows 1
                  set title "1st"
                  set xrange [0:20]
                  plot tan((pi/180)*x) title "Analytical" w l ls 1,
                  tan(2*(pi/180)*x) title "Observed" w lp ls 2,
                  tan(3*(pi/180)*x) title "Experimental" w lp ls 3

                  set title "2nd"
                  set xrange [0:20]
                  plot tan((pi/180)*x) title "Analytical" w l ls 1,
                  tan(2*(pi/180)*x) title "Observed" w lp ls 2,
                  tan(3*(pi/180)*x) title "Experimental" w lp ls 3

                  set title "3rd"
                  set xrange [0:20]
                  plot tan((pi/180)*x) title "Analytical" w l ls 1,
                  tan(2*(pi/180)*x) title "Observed" w lp ls 2,
                  tan(3*(pi/180)*x) title "Experimental" w lp ls 3

                  unset multiplot


                  enter image description here






                  share|improve this answer













                  You can force the legend to consist of a single row by specifying set key vertical maxrows 1:



                  set xlabel "X-Axis"
                  set ylabel "Y-Axis"
                  set multiplot layout 2,3
                  set key at screen 0.5, 0.40 center vertical height 1 box maxrows 1
                  set title "1st"
                  set xrange [0:20]
                  plot tan((pi/180)*x) title "Analytical" w l ls 1,
                  tan(2*(pi/180)*x) title "Observed" w lp ls 2,
                  tan(3*(pi/180)*x) title "Experimental" w lp ls 3

                  set title "2nd"
                  set xrange [0:20]
                  plot tan((pi/180)*x) title "Analytical" w l ls 1,
                  tan(2*(pi/180)*x) title "Observed" w lp ls 2,
                  tan(3*(pi/180)*x) title "Experimental" w lp ls 3

                  set title "3rd"
                  set xrange [0:20]
                  plot tan((pi/180)*x) title "Analytical" w l ls 1,
                  tan(2*(pi/180)*x) title "Observed" w lp ls 2,
                  tan(3*(pi/180)*x) title "Experimental" w lp ls 3

                  unset multiplot


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered May 16 '18 at 20:52









                  user8153user8153

                  3,1411316




                  3,1411316























                      0














                      Each of your 3 plots generates a separate key. The multiplot layout places all 3 plots on the same page, but still each one is only 1/3 of the page in width and that sets the maximum horizontal size of its key. In the example you re-position each key to the same place at the bottom of the page so that they lie exactly on top of each other. This does not change their size or shape, only their position.



                      What you can do instead is to manually place each title on the page without reference to the auto-generated key. In order to leave room for the manually placed key entries you can give explicit multiplot layout margins.



                      set multiplot layout 1,3 margins .1, .9, .3, .9
                      set key
                      plot tan((pi/180)*x) title "Analytical" at screen .25,.1 w l ls 1,
                      tan(2*(pi/180)*x) title "Observed" at screen .50,.1 w lp ls 2 ,
                      tan(3*(pi/180)*x) title "Experimental" at screen .75,.1 w lp ls 3
                      unset key
                      plot ...
                      plot ...
                      unset multiplot


                      Placing a box around the manually positioned titles is a separate question.






                      share|improve this answer



























                        0














                        Each of your 3 plots generates a separate key. The multiplot layout places all 3 plots on the same page, but still each one is only 1/3 of the page in width and that sets the maximum horizontal size of its key. In the example you re-position each key to the same place at the bottom of the page so that they lie exactly on top of each other. This does not change their size or shape, only their position.



                        What you can do instead is to manually place each title on the page without reference to the auto-generated key. In order to leave room for the manually placed key entries you can give explicit multiplot layout margins.



                        set multiplot layout 1,3 margins .1, .9, .3, .9
                        set key
                        plot tan((pi/180)*x) title "Analytical" at screen .25,.1 w l ls 1,
                        tan(2*(pi/180)*x) title "Observed" at screen .50,.1 w lp ls 2 ,
                        tan(3*(pi/180)*x) title "Experimental" at screen .75,.1 w lp ls 3
                        unset key
                        plot ...
                        plot ...
                        unset multiplot


                        Placing a box around the manually positioned titles is a separate question.






                        share|improve this answer

























                          0












                          0








                          0







                          Each of your 3 plots generates a separate key. The multiplot layout places all 3 plots on the same page, but still each one is only 1/3 of the page in width and that sets the maximum horizontal size of its key. In the example you re-position each key to the same place at the bottom of the page so that they lie exactly on top of each other. This does not change their size or shape, only their position.



                          What you can do instead is to manually place each title on the page without reference to the auto-generated key. In order to leave room for the manually placed key entries you can give explicit multiplot layout margins.



                          set multiplot layout 1,3 margins .1, .9, .3, .9
                          set key
                          plot tan((pi/180)*x) title "Analytical" at screen .25,.1 w l ls 1,
                          tan(2*(pi/180)*x) title "Observed" at screen .50,.1 w lp ls 2 ,
                          tan(3*(pi/180)*x) title "Experimental" at screen .75,.1 w lp ls 3
                          unset key
                          plot ...
                          plot ...
                          unset multiplot


                          Placing a box around the manually positioned titles is a separate question.






                          share|improve this answer













                          Each of your 3 plots generates a separate key. The multiplot layout places all 3 plots on the same page, but still each one is only 1/3 of the page in width and that sets the maximum horizontal size of its key. In the example you re-position each key to the same place at the bottom of the page so that they lie exactly on top of each other. This does not change their size or shape, only their position.



                          What you can do instead is to manually place each title on the page without reference to the auto-generated key. In order to leave room for the manually placed key entries you can give explicit multiplot layout margins.



                          set multiplot layout 1,3 margins .1, .9, .3, .9
                          set key
                          plot tan((pi/180)*x) title "Analytical" at screen .25,.1 w l ls 1,
                          tan(2*(pi/180)*x) title "Observed" at screen .50,.1 w lp ls 2 ,
                          tan(3*(pi/180)*x) title "Experimental" at screen .75,.1 w lp ls 3
                          unset key
                          plot ...
                          plot ...
                          unset multiplot


                          Placing a box around the manually positioned titles is a separate question.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered May 16 '18 at 20:34









                          EthanEthan

                          2,0612610




                          2,0612610



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • 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%2fstackoverflow.com%2fquestions%2f50368785%2fthe-horizontal-key-displays-in-vertical-in-gnuplot%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

                              Top Tejano songwriter Luis Silva dead of heart attack at 64

                              政党

                              天津地下鉄3号線