Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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).

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

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

No way.

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

share|improve this answer
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .