Matplotlib - Image Location Question

Posted on
Thu Jan 24, 2019 10:04 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Matplotlib - Image Location Question

Just a general question on the best location for chart images that will be displayed in a Control Page.

Currently, I have chart images specified to be created in /Library/Application Support/Perceptive Automation/Indigo 7.2/IndigoWebServer/images/controls/static/.

I have discovered the disadvantage of this location is that the refreshing image Control Page URL needs to be updated to handle the upgrade of Indigo versions now that Indigo is being setup to use Indigo 7.x folders that change on each sub-release.

If you could specify in the Control Page URL a prefix such as e.g. <<INDIGO STATIC>> followed by the image file name that would work OK but I don't think you can?

Maybe I just need to move them out of the Indigo folder structure. What do other users do? :)

Posted on
Thu Jan 24, 2019 11:13 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Matplotlib - Image Location Question

If they are regularly generated images, I'd just move them into a standard macOS location (like Documents). The only real reason to put stuff in the Indigo install directory is because you need it to be backed up as part of your normal Indigo backup. But if the images are transient that's less of a problem.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Jan 24, 2019 12:25 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib - Image Location Question

To add to Jay's answer, when developing the plugin, I looked at a number of different options and decided that there was no one right answer. Where I landed was to have the default set to the static images folder so that the resulting chart images would appear in the static images drop-down list of the control page editor which makes it easy to add. This is the way I use them, and they update nicely when control pages are reloaded (they obviously don't refresh on their own.)

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Thu Jan 24, 2019 1:10 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Matplotlib - Image Location Question

Thanks for the replies :D

I will move them into Documents as I have the images set to refreshing every 4 seconds and if you click on them I run a Matplotlib regeneration of the chart and hence the image will update. :)

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests