BookmarkSubscribeRSS Feed
mikedriscoll

Community Trekker

Joined:

Jun 23, 2011

JMP script progress indicator

Hi,

With some searching on this forum and digging in the JMP scripting book, I've managed to mostly get my progress script working.  The only thing I don't like is that the vertical (y) axis has numbers on it. Can I turn these off? I was not able to find a way to do this.  Not sure if I should be using something other than a graph box() but my knowledge of this is fairly limited.

dlgStatus = new window("Conversion Progress",

    dlg_gb = graph box(

        Title ("Conversion Progress"),

        FrameSize ( 200, 30),

        xscale(0,100),

        yscale(0, 1), // <---- how to turn off so i don't see the y axis values?

        yaxis (show major ticks (0), show minor ticks (0)),

       

        xname("% complete"),

        yname("")

    )

);

dlgStatus[FrameBox(1)] << Add Graphics Script({Fill Color("blue"),Rect(0,1,50,0,1)}); // 50% on a scale to 100% shown in the xscale above. does not get scaled to the pixel count in frame size()

dlgStatus[FrameBox(1)] << Add Graphics Script({Fill Color("blue"),Rect(0,1,75,0,1)}); // 75% on a scale to 100% shown in the xscale above.

// above is just  a test.  the 50 and 75 would be a loop index variable divided by loop count, in my real script. It would get executed once in each loop iteration.

dlgStatus << closewindow();

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
pmroz

Super User

Joined:

Jun 23, 2011

Solution

Re: JMP script progress indicator

You can get rid of the axes with these commands:

dlg_gb[AxisBox( 2 )] << Delete;

dlg_gb[AxisBox( 1 )] << Delete;


Put these two lines just before the first dlgStatus[FrameBox(1)]... command.

2 REPLIES
pmroz

Super User

Joined:

Jun 23, 2011

Solution

Re: JMP script progress indicator

You can get rid of the axes with these commands:

dlg_gb[AxisBox( 2 )] << Delete;

dlg_gb[AxisBox( 1 )] << Delete;


Put these two lines just before the first dlgStatus[FrameBox(1)]... command.

mikedriscoll

Community Trekker

Joined:

Jun 23, 2011

Re: JMP script progress indicator

Thanks, that worked perfectly.

The (1) got rid of my y axis. I left the (2) in place to show %.

I also found I needed a bit of a wait (more than a wait(0);) to update the graphic... here is the end of my loop where i update the graph box:

    progress = floor((paramNum / numParams)*100);
    dlgStatus[FrameBox(1)] << Add Graphics Script({Fill Color("blue"),Rect(0,1,progress,0,1)}); //update progress
   wait(0.001);

    );

Not sure if i needed the "floor" function but it doesn't hurt in my case.