It’s World Statistics Day! To honor the theme of the day, the JMP User Community is having conversations about the importance of trust in statistics and data. And we want to hear from you! Tell us the steps you take to ensure that your data is trustworthy.
Highlighted
daniel_harding
Level III

put a logo into a GUI

I am attempting to put a company logo into a GUI. So far I have experimented with converting a jpeg into hex code and using a picture box function, but this has been a bit of a dead end. If anyone has experience with this or any suggestions, I would be extremely grateful!

3 REPLIES 3
Highlighted

Re: put a logo into a GUI

Hi - something like this should do it:

logo = "c:\MyLogo.png";

logobox = graph box(Frame Size(200, 100), xscale(0, 100), yscale(0, 100),

     << add image(

          open(logo),

          bounds(left(0), right(100), top(100), bottom(0)),

          transparency(1.0)

          )

     );

logobox[axis box(2)] << delete; // get rid of the Y axis;

logobox[axis box(1)] << delete; // get rid of the X axis;

nw = new window("My Window", logobox);

(I'd like to have pasted in a small script here, but I find I can't: half the text is missing every time I try.  Does anyone know why this would be?)

Cheers,

David

Highlighted
GoodMan
Level III

Re: put a logo into a GUI

David,

I have the same problem to put a logo in a report. I tried your code, however it seem not work using a a png file in my c disk. Can you send me your JSL again to my email address, leanpharma@gmail.com?  I guess if i miss some word using the posted code.

Highlighted

Re: put a logo into a GUI

Hi - I've just emailed you a copy of the script; however I've just checked the copy I originally posted and tried running it in both JMP 9 and JMP 10 with both a PNG image and a JPEG, and all seem to work.  Are you running JMP 8 by any chance?  I don't have a copy of that version on which to check it, but I suspect it probably wouldn't work before version 9.

Cheers,

David

Article Labels

    There are no labels assigned to this post.