How to draw two different grounds












3















I wanna draw a ground with three lines (see Fig. a.), but in circuitikz, the ground is associated with four lines (see Fig. b.). My question is that is it possible to draw a nice ground with three lines in circuitikz or others?



enter image description here










share|improve this question





























    3















    I wanna draw a ground with three lines (see Fig. a.), but in circuitikz, the ground is associated with four lines (see Fig. b.). My question is that is it possible to draw a nice ground with three lines in circuitikz or others?



    enter image description here










    share|improve this question



























      3












      3








      3


      0






      I wanna draw a ground with three lines (see Fig. a.), but in circuitikz, the ground is associated with four lines (see Fig. b.). My question is that is it possible to draw a nice ground with three lines in circuitikz or others?



      enter image description here










      share|improve this question
















      I wanna draw a ground with three lines (see Fig. a.), but in circuitikz, the ground is associated with four lines (see Fig. b.). My question is that is it possible to draw a nice ground with three lines in circuitikz or others?



      enter image description here







      tikz-pgf circuitikz tikz-circuit-lib






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 21 hours ago









      JouleV

      5,16511239




      5,16511239










      asked 21 hours ago









      ruzruz

      514




      514






















          2 Answers
          2






          active

          oldest

          votes


















          6














          It's not too difficult to suppress the fourth line in ground nodes:



          documentclass{article} 
          usepackage{circuitikz}

          makeatletter
          pgfdeclareshape{ground}{
          anchor{center}{
          pgfpointorigin
          }
          behindforegroundpath{
          pgf@circ@res@step=ctikzvalof{monopoles/ground/width}pgf@circ@Rlen

          pgfscope
          pgfpathmoveto{pgfpointorigin}
          pgfpathlineto{pgfpoint{0pt}{-pgf@circ@res@step}}
          pgfusepath{draw}

          pgfstartlinewidth=pgflinewidth
          %pgfsetlinewidth{pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}pgfstartlinewidth}

          pgfpathmoveto{pgfpoint{-pgf@circ@res@step}{-pgf@circ@res@step}}
          pgfpathlineto{pgfpoint{pgf@circ@res@step}{-pgf@circ@res@step}}
          pgfusepath{draw}

          pgfsetlinewidth{pgfstartlinewidth}
          pgfpathmoveto{pgfpoint{-.8pgf@circ@res@step}{-1.2pgf@circ@res@step}}
          pgfpathlineto{pgfpoint{.8pgf@circ@res@step}{-1.2pgf@circ@res@step}}
          pgfpathmoveto{pgfpoint{-.6pgf@circ@res@step}{-1.4pgf@circ@res@step}}
          pgfpathlineto{pgfpoint{.6pgf@circ@res@step}{-1.4pgf@circ@res@step}}
          % pgfpathmoveto{pgfpoint{-.4pgf@circ@res@step}{-1.6pgf@circ@res@step}}
          % pgfpathlineto{pgfpoint{.4pgf@circ@res@step}{-1.6pgf@circ@res@step}}
          pgfsetcolor{pgfkeysvalueof{/tikz/circuitikz/color}}
          pgfusepath{draw}


          pgfsetlinewidth{pgfstartlinewidth}

          endpgfscope
          }

          }
          makeatother

          begin{document}
          begin{circuitikz}
          draw (0,0) node[ground] (g) {};
          end{circuitikz}
          end{document}


          enter image description here






          share|improve this answer































            4














            One can always draw it manually using pure TikZ:



            documentclass{article}
            usepackage{subcaption}
            usepackage{tikz}
            begin{document}
            begin{figure}[htbp]
            centering
            begin{subfigure}[t]{2cm}
            centering
            begin{tikzpicture}
            draw (0,0)--(0,1) (0,1.2)--(0,2.2);
            draw[thick] (-.3,1.2)--(.3,1.2) (-.3,1)--(.3,1);
            draw (-.2,0)--(.2,0) (-.125,-.1)--(.125,-.1) (-.05,-.2)--(.05,-.2);
            end{tikzpicture}
            caption{}
            end{subfigure}
            begin{subfigure}[t]{2cm}
            centering
            begin{tikzpicture}
            draw (0,0)--(0,1) (0,1.2)--(0,2.2);
            draw[thick] (-.3,1.2)--(.3,1.2) (-.3,1)--(.3,1);
            draw (-.2,0)--(.2,0) (-.15,-.1)--(.15,-.1) (-.1,-.2)--(.1,-.2) (-.05,-.3)--(.05,-.3);
            end{tikzpicture}
            caption{}
            end{subfigure}
            caption{}
            label{fig:my_label}
            end{figure}
            end{document}


            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%2f478839%2fhow-to-draw-two-different-grounds%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









              6














              It's not too difficult to suppress the fourth line in ground nodes:



              documentclass{article} 
              usepackage{circuitikz}

              makeatletter
              pgfdeclareshape{ground}{
              anchor{center}{
              pgfpointorigin
              }
              behindforegroundpath{
              pgf@circ@res@step=ctikzvalof{monopoles/ground/width}pgf@circ@Rlen

              pgfscope
              pgfpathmoveto{pgfpointorigin}
              pgfpathlineto{pgfpoint{0pt}{-pgf@circ@res@step}}
              pgfusepath{draw}

              pgfstartlinewidth=pgflinewidth
              %pgfsetlinewidth{pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}pgfstartlinewidth}

              pgfpathmoveto{pgfpoint{-pgf@circ@res@step}{-pgf@circ@res@step}}
              pgfpathlineto{pgfpoint{pgf@circ@res@step}{-pgf@circ@res@step}}
              pgfusepath{draw}

              pgfsetlinewidth{pgfstartlinewidth}
              pgfpathmoveto{pgfpoint{-.8pgf@circ@res@step}{-1.2pgf@circ@res@step}}
              pgfpathlineto{pgfpoint{.8pgf@circ@res@step}{-1.2pgf@circ@res@step}}
              pgfpathmoveto{pgfpoint{-.6pgf@circ@res@step}{-1.4pgf@circ@res@step}}
              pgfpathlineto{pgfpoint{.6pgf@circ@res@step}{-1.4pgf@circ@res@step}}
              % pgfpathmoveto{pgfpoint{-.4pgf@circ@res@step}{-1.6pgf@circ@res@step}}
              % pgfpathlineto{pgfpoint{.4pgf@circ@res@step}{-1.6pgf@circ@res@step}}
              pgfsetcolor{pgfkeysvalueof{/tikz/circuitikz/color}}
              pgfusepath{draw}


              pgfsetlinewidth{pgfstartlinewidth}

              endpgfscope
              }

              }
              makeatother

              begin{document}
              begin{circuitikz}
              draw (0,0) node[ground] (g) {};
              end{circuitikz}
              end{document}


              enter image description here






              share|improve this answer




























                6














                It's not too difficult to suppress the fourth line in ground nodes:



                documentclass{article} 
                usepackage{circuitikz}

                makeatletter
                pgfdeclareshape{ground}{
                anchor{center}{
                pgfpointorigin
                }
                behindforegroundpath{
                pgf@circ@res@step=ctikzvalof{monopoles/ground/width}pgf@circ@Rlen

                pgfscope
                pgfpathmoveto{pgfpointorigin}
                pgfpathlineto{pgfpoint{0pt}{-pgf@circ@res@step}}
                pgfusepath{draw}

                pgfstartlinewidth=pgflinewidth
                %pgfsetlinewidth{pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}pgfstartlinewidth}

                pgfpathmoveto{pgfpoint{-pgf@circ@res@step}{-pgf@circ@res@step}}
                pgfpathlineto{pgfpoint{pgf@circ@res@step}{-pgf@circ@res@step}}
                pgfusepath{draw}

                pgfsetlinewidth{pgfstartlinewidth}
                pgfpathmoveto{pgfpoint{-.8pgf@circ@res@step}{-1.2pgf@circ@res@step}}
                pgfpathlineto{pgfpoint{.8pgf@circ@res@step}{-1.2pgf@circ@res@step}}
                pgfpathmoveto{pgfpoint{-.6pgf@circ@res@step}{-1.4pgf@circ@res@step}}
                pgfpathlineto{pgfpoint{.6pgf@circ@res@step}{-1.4pgf@circ@res@step}}
                % pgfpathmoveto{pgfpoint{-.4pgf@circ@res@step}{-1.6pgf@circ@res@step}}
                % pgfpathlineto{pgfpoint{.4pgf@circ@res@step}{-1.6pgf@circ@res@step}}
                pgfsetcolor{pgfkeysvalueof{/tikz/circuitikz/color}}
                pgfusepath{draw}


                pgfsetlinewidth{pgfstartlinewidth}

                endpgfscope
                }

                }
                makeatother

                begin{document}
                begin{circuitikz}
                draw (0,0) node[ground] (g) {};
                end{circuitikz}
                end{document}


                enter image description here






                share|improve this answer


























                  6












                  6








                  6







                  It's not too difficult to suppress the fourth line in ground nodes:



                  documentclass{article} 
                  usepackage{circuitikz}

                  makeatletter
                  pgfdeclareshape{ground}{
                  anchor{center}{
                  pgfpointorigin
                  }
                  behindforegroundpath{
                  pgf@circ@res@step=ctikzvalof{monopoles/ground/width}pgf@circ@Rlen

                  pgfscope
                  pgfpathmoveto{pgfpointorigin}
                  pgfpathlineto{pgfpoint{0pt}{-pgf@circ@res@step}}
                  pgfusepath{draw}

                  pgfstartlinewidth=pgflinewidth
                  %pgfsetlinewidth{pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}pgfstartlinewidth}

                  pgfpathmoveto{pgfpoint{-pgf@circ@res@step}{-pgf@circ@res@step}}
                  pgfpathlineto{pgfpoint{pgf@circ@res@step}{-pgf@circ@res@step}}
                  pgfusepath{draw}

                  pgfsetlinewidth{pgfstartlinewidth}
                  pgfpathmoveto{pgfpoint{-.8pgf@circ@res@step}{-1.2pgf@circ@res@step}}
                  pgfpathlineto{pgfpoint{.8pgf@circ@res@step}{-1.2pgf@circ@res@step}}
                  pgfpathmoveto{pgfpoint{-.6pgf@circ@res@step}{-1.4pgf@circ@res@step}}
                  pgfpathlineto{pgfpoint{.6pgf@circ@res@step}{-1.4pgf@circ@res@step}}
                  % pgfpathmoveto{pgfpoint{-.4pgf@circ@res@step}{-1.6pgf@circ@res@step}}
                  % pgfpathlineto{pgfpoint{.4pgf@circ@res@step}{-1.6pgf@circ@res@step}}
                  pgfsetcolor{pgfkeysvalueof{/tikz/circuitikz/color}}
                  pgfusepath{draw}


                  pgfsetlinewidth{pgfstartlinewidth}

                  endpgfscope
                  }

                  }
                  makeatother

                  begin{document}
                  begin{circuitikz}
                  draw (0,0) node[ground] (g) {};
                  end{circuitikz}
                  end{document}


                  enter image description here






                  share|improve this answer













                  It's not too difficult to suppress the fourth line in ground nodes:



                  documentclass{article} 
                  usepackage{circuitikz}

                  makeatletter
                  pgfdeclareshape{ground}{
                  anchor{center}{
                  pgfpointorigin
                  }
                  behindforegroundpath{
                  pgf@circ@res@step=ctikzvalof{monopoles/ground/width}pgf@circ@Rlen

                  pgfscope
                  pgfpathmoveto{pgfpointorigin}
                  pgfpathlineto{pgfpoint{0pt}{-pgf@circ@res@step}}
                  pgfusepath{draw}

                  pgfstartlinewidth=pgflinewidth
                  %pgfsetlinewidth{pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}pgfstartlinewidth}

                  pgfpathmoveto{pgfpoint{-pgf@circ@res@step}{-pgf@circ@res@step}}
                  pgfpathlineto{pgfpoint{pgf@circ@res@step}{-pgf@circ@res@step}}
                  pgfusepath{draw}

                  pgfsetlinewidth{pgfstartlinewidth}
                  pgfpathmoveto{pgfpoint{-.8pgf@circ@res@step}{-1.2pgf@circ@res@step}}
                  pgfpathlineto{pgfpoint{.8pgf@circ@res@step}{-1.2pgf@circ@res@step}}
                  pgfpathmoveto{pgfpoint{-.6pgf@circ@res@step}{-1.4pgf@circ@res@step}}
                  pgfpathlineto{pgfpoint{.6pgf@circ@res@step}{-1.4pgf@circ@res@step}}
                  % pgfpathmoveto{pgfpoint{-.4pgf@circ@res@step}{-1.6pgf@circ@res@step}}
                  % pgfpathlineto{pgfpoint{.4pgf@circ@res@step}{-1.6pgf@circ@res@step}}
                  pgfsetcolor{pgfkeysvalueof{/tikz/circuitikz/color}}
                  pgfusepath{draw}


                  pgfsetlinewidth{pgfstartlinewidth}

                  endpgfscope
                  }

                  }
                  makeatother

                  begin{document}
                  begin{circuitikz}
                  draw (0,0) node[ground] (g) {};
                  end{circuitikz}
                  end{document}


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 20 hours ago









                  IgnasiIgnasi

                  94.4k4173315




                  94.4k4173315























                      4














                      One can always draw it manually using pure TikZ:



                      documentclass{article}
                      usepackage{subcaption}
                      usepackage{tikz}
                      begin{document}
                      begin{figure}[htbp]
                      centering
                      begin{subfigure}[t]{2cm}
                      centering
                      begin{tikzpicture}
                      draw (0,0)--(0,1) (0,1.2)--(0,2.2);
                      draw[thick] (-.3,1.2)--(.3,1.2) (-.3,1)--(.3,1);
                      draw (-.2,0)--(.2,0) (-.125,-.1)--(.125,-.1) (-.05,-.2)--(.05,-.2);
                      end{tikzpicture}
                      caption{}
                      end{subfigure}
                      begin{subfigure}[t]{2cm}
                      centering
                      begin{tikzpicture}
                      draw (0,0)--(0,1) (0,1.2)--(0,2.2);
                      draw[thick] (-.3,1.2)--(.3,1.2) (-.3,1)--(.3,1);
                      draw (-.2,0)--(.2,0) (-.15,-.1)--(.15,-.1) (-.1,-.2)--(.1,-.2) (-.05,-.3)--(.05,-.3);
                      end{tikzpicture}
                      caption{}
                      end{subfigure}
                      caption{}
                      label{fig:my_label}
                      end{figure}
                      end{document}


                      enter image description here






                      share|improve this answer




























                        4














                        One can always draw it manually using pure TikZ:



                        documentclass{article}
                        usepackage{subcaption}
                        usepackage{tikz}
                        begin{document}
                        begin{figure}[htbp]
                        centering
                        begin{subfigure}[t]{2cm}
                        centering
                        begin{tikzpicture}
                        draw (0,0)--(0,1) (0,1.2)--(0,2.2);
                        draw[thick] (-.3,1.2)--(.3,1.2) (-.3,1)--(.3,1);
                        draw (-.2,0)--(.2,0) (-.125,-.1)--(.125,-.1) (-.05,-.2)--(.05,-.2);
                        end{tikzpicture}
                        caption{}
                        end{subfigure}
                        begin{subfigure}[t]{2cm}
                        centering
                        begin{tikzpicture}
                        draw (0,0)--(0,1) (0,1.2)--(0,2.2);
                        draw[thick] (-.3,1.2)--(.3,1.2) (-.3,1)--(.3,1);
                        draw (-.2,0)--(.2,0) (-.15,-.1)--(.15,-.1) (-.1,-.2)--(.1,-.2) (-.05,-.3)--(.05,-.3);
                        end{tikzpicture}
                        caption{}
                        end{subfigure}
                        caption{}
                        label{fig:my_label}
                        end{figure}
                        end{document}


                        enter image description here






                        share|improve this answer


























                          4












                          4








                          4







                          One can always draw it manually using pure TikZ:



                          documentclass{article}
                          usepackage{subcaption}
                          usepackage{tikz}
                          begin{document}
                          begin{figure}[htbp]
                          centering
                          begin{subfigure}[t]{2cm}
                          centering
                          begin{tikzpicture}
                          draw (0,0)--(0,1) (0,1.2)--(0,2.2);
                          draw[thick] (-.3,1.2)--(.3,1.2) (-.3,1)--(.3,1);
                          draw (-.2,0)--(.2,0) (-.125,-.1)--(.125,-.1) (-.05,-.2)--(.05,-.2);
                          end{tikzpicture}
                          caption{}
                          end{subfigure}
                          begin{subfigure}[t]{2cm}
                          centering
                          begin{tikzpicture}
                          draw (0,0)--(0,1) (0,1.2)--(0,2.2);
                          draw[thick] (-.3,1.2)--(.3,1.2) (-.3,1)--(.3,1);
                          draw (-.2,0)--(.2,0) (-.15,-.1)--(.15,-.1) (-.1,-.2)--(.1,-.2) (-.05,-.3)--(.05,-.3);
                          end{tikzpicture}
                          caption{}
                          end{subfigure}
                          caption{}
                          label{fig:my_label}
                          end{figure}
                          end{document}


                          enter image description here






                          share|improve this answer













                          One can always draw it manually using pure TikZ:



                          documentclass{article}
                          usepackage{subcaption}
                          usepackage{tikz}
                          begin{document}
                          begin{figure}[htbp]
                          centering
                          begin{subfigure}[t]{2cm}
                          centering
                          begin{tikzpicture}
                          draw (0,0)--(0,1) (0,1.2)--(0,2.2);
                          draw[thick] (-.3,1.2)--(.3,1.2) (-.3,1)--(.3,1);
                          draw (-.2,0)--(.2,0) (-.125,-.1)--(.125,-.1) (-.05,-.2)--(.05,-.2);
                          end{tikzpicture}
                          caption{}
                          end{subfigure}
                          begin{subfigure}[t]{2cm}
                          centering
                          begin{tikzpicture}
                          draw (0,0)--(0,1) (0,1.2)--(0,2.2);
                          draw[thick] (-.3,1.2)--(.3,1.2) (-.3,1)--(.3,1);
                          draw (-.2,0)--(.2,0) (-.15,-.1)--(.15,-.1) (-.1,-.2)--(.1,-.2) (-.05,-.3)--(.05,-.3);
                          end{tikzpicture}
                          caption{}
                          end{subfigure}
                          caption{}
                          label{fig:my_label}
                          end{figure}
                          end{document}


                          enter image description here







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 20 hours ago









                          JouleVJouleV

                          5,16511239




                          5,16511239






























                              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%2f478839%2fhow-to-draw-two-different-grounds%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 label and detect the document text images

                              Vallis Paradisi

                              Tabula Rosettana