Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Generating image (jpeg file) using ResTree
PostPosted: Mon Aug 19, 2013 10:44 pm 
Hi all,

I am trying to use ResTree function from resgraph library. I have already installed xv and graphviz packages (all using fink project), and both are in standard search PATH. Now, when I try to replicate the exact code given here mainsite/tutor_resol.ps (well, I am not allowed to post URLs apparently).

(namely, page 4) it is not working. To be more precise, I enter all the commands (defining the necessary ring and ideal), and when I finally type in: ResTree(re, coll[1]), the following is displayed:

sh: dot: command not found
Currently showing graphics in separate window
Press <Return> to continue

And pop-up window shows-up (from XQuartz software) saying that:

Can't open the file "Users/myusername/ResTree.dot.jpg"
No such file or directory.

When I go to the indicated folder (Users/myusername/) I did find file named "ResTree.dot" (which was generated right after I entered "ResTree(re, coll[1])" command), but it is not a JPEG file. So I think the problem is Singular is not generating the desired JPEG file for some reason.

I have been spending past 3 days trying to work this out, but to no avail. I would very much appreciate any help!


Report this post
Top
  
Reply with quote  
 Post subject: Re: Generating image (jpeg file) using ResTree
PostPosted: Mon Aug 19, 2013 10:47 pm 
I forgot to mention the operating system I am using (in case it is relevant). I am using Mac OS X (Version 10.8.4).


Report this post
Top
  
Reply with quote  
 Post subject: Re: Generating image (jpeg file) using ResTree
PostPosted: Tue Aug 20, 2013 1:07 pm 

Joined: Wed May 25, 2005 4:16 pm
Posts: 275
To produce the jpeg file:
Code:
dot  -Tjpeg  ResTree.dot -o  ResTree.dot.jpg 

Try this in a terminal.
If it does not work, graphviz is not correctly installed (dot is a program from graphviz).
Otherwise, your PATH may be wrong:
Try within Singular:
Code:
system("sh","echo $PATH");

which should have /sw/bin in it.
Also try
Code:
system("sh","which dot");


Hope that helps


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Generating image (jpeg file) using ResTree
PostPosted: Thu Aug 29, 2013 4:58 pm 
Dear Hannes,

Thank you very much for your help! You were quite right that graphviz wasn't installed correctly. After getting some help from IT support from the math department, it is working now and the graphic output is produced! :)


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

It is currently Fri May 13, 2022 11:05 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group