Solved

simple graphic presentation in unix

Posted on 2002-05-15
10
280 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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 20

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

809 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