Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to edit the equation of a Grapher file without opening the Grapher UI.
I've gotten as far as knowing that I need a hex editor to do this. I can't, however, find my equation in that file to change it. Does anyone know how Grapher stores this information, and how to change it?

My ultimate goal is to be able to change the file through the shell so I can open it and have Grapher show me my new equation (that was set with the CL).

Thanks!
I will set a bounty if necessary.

share|improve this question
    
Is there some reason you can't use other software made for turning marked-up text files into graphs via the commandline, e.g., like certain LaTeX packages (pgfplots, etc.)? –  frabjous Jan 8 '11 at 16:57
    
@frabjous: The idea with using Grapher is that it's preinstalled on all Macs. –  Nathan G. Jan 8 '11 at 17:20
    
Unless you have a pressing reason, you should use the right tool for the job, not what happens to come pre-installed. –  frabjous Jan 8 '11 at 17:26
    
My software (for Mac) does math with lines. I saw no reason to write my own graphing engine, since there are so many good ones already. However, a graph would be useful sometimes. So, I figure I'll just link with Grapher for those occasions. But, I can't figure out how to talk to it. Thanks! –  Nathan G. Jan 8 '11 at 17:32
    
I suggest GnuPlot. Probably easier getting that working than reverse engineering the Grapher format. –  Daniel Beck Jan 9 '11 at 13:19
add comment

2 Answers

Gnuplot makes graphs that can be controlled from command line, scipts, and data files. It can be downloaded and run on OSX. There is a great book on gnuplot from O'Reilly publishers. This would be much easier.

I wouldn't bother hacking grapher.

share|improve this answer
add comment

No way.

"GCX" files are compiled document files, not data sources (same difference between MS Word documents and .txt files)

share|improve this answer
1  
You're right that they're compiled documents, but I don't think you're right that they're impossible to work with. MS Word is compiled, and there are tons of apps that can read and write in that format. –  Nathan G. May 28 '11 at 16:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.