Find the answer to your Linux question:
Results 1 to 8 of 8
hello,everyone. I found that there are some graphs that is complicated in txt file, and it takes time to draw the graph in the txt file directly. Here is an ...
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    6

    how to draw graph in txt file quickly?

    hello,everyone.
    I found that there are some graphs that is complicated in txt file, and it takes time to draw the graph in the txt file directly. Here is an example below.

    +-----------+ +-----------+
    | Guest | | Guest |
    | A | | B |
    | +---+ | | +---+ |
    | |NIC| | | |NIC| |
    +---+-+-+---+ +---+-+-+---+
    ^ +--------+ +--------+ ^
    | | | | | |
    +------>+ VLAN 0 +<--> Socket <-->+ VLAN 2 +<------+
    | | | |
    +--------+ +--------+


    Is there some tool that can draw these graphs quickly and can be converted to be displayed in txt file ?

    besh wishes,
    robert

  2. #2
    Just Joined!
    Join Date
    Mar 2009
    Posts
    6
    Quote Originally Posted by robertsong View Post
    hello,everyone.
    I found that there are some graphs that is complicated in txt file, and it takes time to draw the graph in the txt file directly. Here is an example below.

    +-----------+ +-----------+
    | Guest | | Guest |
    | A | | B |
    | +---+ | | +---+ |
    | |NIC| | | |NIC| |
    +---+-+-+---+ +---+-+-+---+
    ^ +--------+ +--------+ ^
    | | | | | |
    +------>+ VLAN 0 +<--> Socket <-->+ VLAN 2 +<------+
    | | | |
    +--------+ +--------+


    Is there some tool that can draw these graphs quickly and can be converted to be displayed in txt file ?

    besh wishes,
    robert
    well, the graph format is bad, Here is the link to show the example:
    QEMU Networking

  3. #3
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117
    Hi.

    See man pic -- an excerpt:
    Code:
    PIC(1)                                                                  PIC(1)
    
    NAME
           pic - compile pictures for troff or TeX
    
    SYNOPSIS
           pic [ -nvCSU ] [ filename ... ]
           pic -t [ -cvzCSU ] [ filename ... ]
    
    DESCRIPTION
           This manual page describes the GNU version of pic, which is part of the
           groff document formatting system.  pic compiles  descriptions  of  pic-
           tures  embedded  within troff or TeX input files into commands that are
           understood by TeX or troff.
    Best wishes ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  4. #4
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117
    Hi.

    Regrettably in trying to provide an example of pic-to-ascii diagrams, I have not yet been able to find an output driver for groff that will translate pic output into ascii.

    I'll stop back when / if I find anything ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  5. #5
    Just Joined!
    Join Date
    Mar 2009
    Posts
    6
    Quote Originally Posted by drl View Post
    Hi.

    Regrettably in trying to provide an example of pic-to-ascii diagrams, I have not yet been able to find an output driver for groff that will translate pic output into ascii.

    I'll stop back when / if I find anything ... cheers, drl
    drl:
    thank you very much.
    I will take a try.

    Best wishes,
    robert

  6. #6
    Linux Newbie
    Join Date
    Sep 2007
    Posts
    161
    hi robert,

    do you use vim?
    there is a vim plugin called "sketch" which lets you draw ascii picture directly.
    you can draw freehand, but there's also support for boxes, arrows, copying, etc.
    you can check out the tutorial here.

    the plugin is available at vim.org.

    cheers, kai

    PS there are also other plugins for drawing in vim - i haven't tried them.

  7. #7
    Just Joined!
    Join Date
    Mar 2009
    Posts
    6
    kai,
    thank you for your reply.
    It is a nice plugin, and is what I need, although not work so well with vim 7.x.

    best wishes,
    robert

    Quote Originally Posted by kai12 View Post
    hi robert,

    do you use vim?
    there is a vim plugin called "sketch" which lets you draw ascii picture directly.
    you can draw freehand, but there's also support for boxes, arrows, copying, etc.
    you can check out the tutorial here.

    the plugin is available at vim.org.

    cheers, kai

    PS there are also other plugins for drawing in vim - i haven't tried them.

  8. #8
    Linux Newbie
    Join Date
    Sep 2007
    Posts
    161
    oh, too bad.
    it's working for me in gvim 7.0 -- i've installed the plain debian vim packages.

    kai

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...