Page 1 of 1

zgrid: grid preferences not applied with default.set

Posted: Wed Jan 02, 2008 10:24 am
by BenB
Hi,

It's a small detail, but I noticed that the grid display preferences are ignored when the preferences are applied automatically through default.set at the creation of a new zgrid plot. I have to click "get preferences" and select default.set again to have the grid appear on the plot!

Ben

Posted: Wed Jan 02, 2008 11:03 am
by DPlotAdmin
Ben,
Assuming you're still talking about the Add-In ZGrid command, the grid lines are turned off by the Add-In. Currently (with all of the AddIn commands and any other program that produces a graph with DPlot_Plot or a similar function) DPlot first processes default.set if it exists, then processes any commands sent from the caller... and I don't think I'd want to do anything different with this.

I'll give some thought to whether the AddIn should be forcing several settings. Off the top of my head I think it will probably stay as is... but I might also talk myself out of that. If you're interested you can change the Add-In yourself so that the grid will be drawn with your default preferences. See "Editing the Add-In" here: http://www.dplot.com/help/index.htm?helpid_addin.htm. Find the ZGrid subroutine, then this line:

Code: Select all

    cmds = cmds & "[Contour3D(0)][ContourGrid(0)]"
and delete [ContourGrid(0)]:

Code: Select all

    cmds = cmds & "[Contour3D(0)]"

Posted: Thu Jan 10, 2008 9:43 am
by BenB
Hi Dave,

I did the modification you suggested, and it does display the grid now, but not in the right color!

Basically the grid appears gray, which I think is the Dplot default value, but in my default.set it is saved as black... Any idea of how I can force it to use the value in my default.set file? I tried playing with the commands in the Zgrid subroutine but didn't succeed so far.

Thanks in advance!
Ben

Posted: Thu Jan 10, 2008 10:45 am
by DPlotAdmin
Unfortunately the color is forced to light gray within dplot.exe when the graph is first created (after default.set has been processed). Off the top of my head I can't think of a good reason to do this, and I'll probably change it in the next release.

You can force the color to black by modifying the Add-In again, this time adding a Color command:

[Color(0,0,0,0)]

The first 0 is the index of the item you want to change the color of; 0=grid lines. The next three parameters are r,g,b values 0-255.

Posted: Thu Jan 10, 2008 10:47 am
by BenB
Hi Dave,

That'll do it!

Thanks for your prompt answer,
Ben