Solved

simple graphic presentation in unix

Posted on 2002-05-15
10
273 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
 
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now