LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-30-2019, 12:27 AM   #1
M.Aman
LQ Newbie
 
Registered: Feb 2019
Posts: 23

Rep: Reputation: Disabled
how to save graph plots in xgraph on centos 7?


hi,

Is there anyway i can save my plots generated in xgraph using ns2 and centos7?

I tried using gnuplot as well, but it gives me the following error,
Cannot open load file 'graphPlot'
"graphPlot", line 0: util.c: No such file or directory

CAn anybody guide me here?

Last edited by M.Aman; 05-30-2019 at 02:01 AM.
 
Old 05-30-2019, 04:21 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Xgraph options : Close - Hdcpy - About.

Open the "Hdcpy" dialog, and type a directory/file-name. Default is Postscript.
I typed /home/knudfl/2020xgr/1
.... The result is attached as 1.ps.txt . Rename to 1.ps , and open.

Alternatively (and easier, may be) : Take a screenshot with ImageMagick :
Code:
$ import screen$RANDOM.jpg
As shell script :
Code:
#!/bin/sh
import screen$RANDOM.jpg;
exit 0;
Make the script executable. copy to /usr/local/bin/, and you can create screenshots any size. Comes with a cross-hair for exact cut.
-
Attached Files
File Type: txt 1.ps.txt (20.7 KB, 20 views)

Last edited by knudfl; 05-30-2019 at 04:24 AM.
 
Old 05-30-2019, 04:51 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Simple gnuplot example ...
Code:
$ gnuplot Leach.gp
And even simpler :
Code:
$ gnuplot
gnuplot> plot "sim.data"
Attached Files
File Type: txt Leach.gp.txt (220 Bytes, 17 views)
File Type: txt sim.data.txt (303 Bytes, 16 views)
 
Old 07-15-2019, 08:51 AM   #4
M.Aman
LQ Newbie
 
Registered: Feb 2019
Posts: 23

Original Poster
Rep: Reputation: Disabled
Thankyou Knudfl. When i click "Hdcpy" the xgraph closes and nothing happens. In the terminal i get a message of Segmentation fault (core dumped). Can you guide me here?

Last edited by M.Aman; 07-15-2019 at 08:58 AM.
 
Old 07-15-2019, 09:48 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #4.

Xgraph is picky with compilers. The "GCC-4.9.3 package" works for me in CentOS 7.
Compiler package = gcc49-c++-4.9.3-1.el6.x86_64.rpm
https://drive.google.com/file/d/1Pwq...ew?usp=sharing
... Provides /usr/bin/{gcc49, g++49}

Download, and install :
Code:
# yum install Downloads/gcc49-c++-4.9.3-1.el6.x86_64.rpm
Build a new 'xgraph' executable :
Code:
cd ns-allinone-2.35/xgraph-12.2/
rm -f depcomp
ln -s /usr/share/automake-1.13/depcomp
make clean
export CC=gcc49 CXX=g++49 && ./configure
make
# make install
My test today, CentOS 7 :
Select Hdcpy in the Xgraph window.
Type ./1.ps in "File or device name" ... and click OK →
→ The file 1.ps is created in the current directory.

... For saving colors, see post #2 ( $ import screen$RANDOM.jpg, etc.)

Extra gcc/g++, EL6 and EL7 https://stackoverflow.com/questions/...89915#47189915

-

Last edited by knudfl; 07-15-2019 at 09:55 AM.
 
  


Reply

Tags
gnuplot, ns2, xgraph, xgraph-ns2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to save a xgraph file in ns2.34 for later printout !! Shruti Linux - Newbie 6 07-11-2011 10:39 AM
LXer: Group plots Desktop Linux printing improvements LXer Syndicated Linux News 0 04-19-2006 08:54 AM
Is there a tool which plots network components in in graphical mode raees Linux - Software 1 04-21-2005 04:51 PM
Is there a Linux program that can draw box plots? Baryonic Being Linux - Software 1 02-12-2005 12:14 PM
gkrellm && RT plots DaFrEQ Linux - Software 1 05-08-2003 07:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration