Solved

simple graphic presentation in unix

Posted on 2002-05-15
10
284 Views
Last Modified: 2010-04-21
hi .

I have a numerical file with numbers from 0 up to Max
cnt(0) = number of 0 at file
cnt(1) = num of 1 at file
...
cnt(Max) = num of Max ot file

example
I have this file :
1 3 5 1 3 4 7 4 2 4 5 6 7 8 9 2 3 4 5 6 2 3 4 3 4 5
cnt() = {0 2 3 5 6 5 2 2 1 1}

sum(cnt) = number of elements in file .

I WANT to view VERY SIMPLE graph on cnt()

I used to pass the file to matlab , but I have no matlab
today , and it is not very easy for me to pass the data
to excel to something like that ,

IS THERE ANY WAY , OF VIEWING VISUALL GRAPH ?

it can be also a charecteristic graph :

example :

|
|        
|         *
|      *    *
|        * *   *
|     *       *
|   *            *
| *                *
___________________________


thanks

tal
0
Comment
Question by:Talmash
10 Comments
 
LVL 5

Expert Comment

by:ecw
ID: 7011475
man graph

0
 
LVL 6

Author Comment

by:Talmash
ID: 7013297
ecw :

I got Neither graph command NOR man graph
0
 
LVL 5

Expert Comment

by:ecw
ID: 7013319
which Unix are you using?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 40

Expert Comment

by:jlevie
ID: 7014420
gnuplot?
0
 
LVL 6

Author Comment

by:Talmash
ID: 7019375
ecw :

sorry , I changed the terminla from a linux to solaris .

I DO got the graph man .

I'll try operate it as soon as I'll have time for reading
it .
can you send me a short exaample , before starting ?


tnx, tal


jlevie :

gnu<tab>
gnuattach gnuclient gnudoit

no gnuplot
0
 
LVL 5

Expert Comment

by:ecw
ID: 7020372
Soryy, forgot to mention all the other stuff you need- plot (or tplot), and for fun spline and xterms Tek window (bottom of middle button menu).

Graph expects to begin a list of pairs, it will join these up with line.  Now I don't understand how cnt in your example relates to the first line of numbers, explain that, and maybe we could come up with a bit of awk to reformat the stuff for graph.

That aside, graph pumps out commands to drive plot (and tplot).  so for the kind of output above, use

echo 0 0 10 10 20 15 30 10 40 0 | graph | plot -Tdumb

to smooth the lines a bit, chuck a spline in front of graph ie.

echo 0 0 10 10 20 15 30 10 40 0 |spline |graph |plot -Tdumb

better yet, fire up xterms Tek window, hit return to get a prompt, and ...

TERM=tek (echo 0 0 10 10 20 15 30 10 40 0 |spline |graph |plot -T4014)

I've been using this for years to get a quick view of charts, way before everyone was forced to use Excel, and still do when I'm in the mood.  It's also the only use I've ever had for Tek emulation.
0
 
LVL 6

Author Comment

by:Talmash
ID: 7023348
ecw :

VERY nice !

I got very primitive graphs using "graph" ,
but the TEK window didn't worked as well .
this error I was received :

TERM = tek ( echo 0 0 10 10 20 15 30 10 40 0 | spline | graph | plot -T4014)
Badly placed ()'s.

from both TEK and regular terminals ,
maybe I didn't activated something etc ...

Tal
0
 
LVL 5

Accepted Solution

by:
ecw earned 210 total points
ID: 7023433
Are you using csh?  I've avoided csh since ksh became widespread, so taht's what I tend to think in.  If csh,

setenv TERM tek
echo 0 0 10 10 20 15 30 10 40 0 | spline | graph | plot -T4014

afterwards set TERM back to xterm
0
 
LVL 21

Expert Comment

by:tfewster
ID: 7921117
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- Answered by ecw

Please leave any comments here within the next 7 days

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

tfewster
Cleanup Volunteer
0
 
LVL 6

Author Comment

by:Talmash
ID: 7924905
thanks and sorry for the delay .

I think I left the idea to present grafic data behind .

it's now much easier , to convert from unix to pc , and use
excel instead .

tal
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question