EDITING GRAPH DOCUMENTS and GRAPHMAT.INI

Graphmatica does not really provide facilities for maintaining equation lists; although you can edit an equation, delete old ones that are no longer needed, and change the order of equations by redrawing selected graphs, determining the precise order of equations in the list is difficult since they are dynamically shuffled each time an equation is entered or redrawn to make Graphmatica more interactive. However, the equation list is just a text file whose structure is virtually identical to Windows-style .ini files; you can create or modify one with virtually any editor. The structure goes like this:

[saved-setup]
charset=UTF-8|Windows-1252
must match the encoding of the file; other character sets are recognized, but as of version 2.2, files are always written as UTF-8. Previously, most English or Western-European Windows systems defaulted to Windows-1252.

[labels]
title = xxxx    any character string
left = xxxx
right = xxxx
xaxis = xxxx    label for x axis (default is "x")
yaxis = xxxx    label for y axis (default is "y")

[annotations]
x0 = #.##    position of label
y0 = #.##
text0 = xxxx    any character string

...

x9 = #.##    replace '0' with 1-9 for more...
y9 = #.##
text9 = xxxx

[grid]
left = #.##    any decimal number
right = #.##    or "auto" to autoscale
top = #.##
bottom = #.##

[options]
paper = polar, trig, rect, slog [#.##], or llog [#.##]
detail = none, axes, dots, or grid
autoredraw = on or off    "on" or "off"
maxannote = ###    any integer 1-999: max # of annotations
maxeqs = ###    any integer 1-999: max # of equations kept
autonum = ###    any integer 0-maxeqs: how many to redraw
legends = on, off, custom, or scale.
xlegspace = #.##    spacing between grid legends
ylegspace = #.##
ylegpos = center or above    y-axis legend position relative to gridlines 
winpos = left,top,right,bottom
color = 1, 2, or mono    colorscheme 1, 2, or monochrome
widelines = on or off    draw graphs with wide lines
widelinewidth = ##    width in pixels of wide lines (default 2)
gridlinewidth = ##    width in pixels of gridlines (normally 1)
drawdots = on or off    draw graphs with dots, not lines
autosquare = on or off
autorange = on or off
labels = on or off
scrollbars = on or off
tables = on or off
tablecols = ##    max number of graphs per table
tablewidth = ###    width in pixels of point tables window
tablecolwidth# = ##    width of each point tables column in pixels
tableincr = #.##    increment between points in tables
tabledecimals = #    number of decimal places to display in tables
warnings = on or off
defaultdirectory = path    Starting directory for Open and Save dialogs
defscale = #.##    any decimal number
fineness = #.##        
tstart = #.##
tstop = #.##
cfmaxorder = #    maximum order of polynomial for curve fitting
cfmaxiter = #####    maximum number of iterations to run curve fit
copywmf = on or off    enable Copy WMF items in Edit menu
autosavesettings = on or off
invertinequalities = on or off    Invert the shading of inequalities

[functions]
f(x)=...
constant=1.2345
any number of function or constant definitions, as entered in the Functions and Constants dialog (each on a separate line of up to 1300 characters).
[equations]
y=f(x)
up to maxeqs equations, each on a separate line of up to 1300 characters.
[eqcolors]
graph# = ##    colors for each of the equations above

[dataplot]
numpoints = ###    number of points in the plot
color = #
shape = #
#.##    #.##    numpoints tab-delimited x and y coordinates

The [saved-setup] tag tells Graphmatica to reset all options to their defaults before loading the new options. It should be left out if you want the current options at the time of loading to be used. The [labels] section specifies the title and y-axis labels. The [grid] section gives the left, right, top and bottom coordinates of the grid. Type "auto" for any one to auto-scale that coordinate based on the other three. Type auto for both the top and bottom to auto-scale the y-axis so the top and bottom coordinates are equal and opposite.

You can omit any item or even a complete section if you don't want to change the default. Type exactly as specified above, including the brackets "[ ]" around the section headings, and replacing the underlined portions with your own values. If you don't know or don't care what the value is for an option, just leave the line out. Don't worry about capitalization, extra spaces, or even extra blank lines. (However, each entry must be on a separate line or some may be ignored.) You can put the options and sections in any order ... the only requirement is that the [saved-setup] tag must come first and the [equations] section must come last, if there is one. Invalid options are also ignored.

If you want to create a file with no titles or options, simply type the "[equations]" header and then type all of your equations. Each equation must be on a separate line.

The GRAPHMAT.INI file, which is loaded whenever you start Graphmatica, uses the exact same format... when you choose the Save Setup Info command, Graphmatica simply saves the setup file as it would an equation list, except the [labels], [annotations], and [equations] sections are omitted.

On Mac OS X, the default values for these settings are persisted in the user defaults for domain "com.graphmatica.Graphmatica" using the key name section.key--for example "options.paper".

Help contents

Back to kSoft homepage...


kSoft, Inc. ksoft@graphmatica.com Last updated: Sun 11 Jun 2017