Page 1 of 1

Matplotlib - Image Location Question

PostPosted: Thu Jan 24, 2019 10:04 am
by autolog
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? :)

Re: Matplotlib - Image Location Question

PostPosted: Thu Jan 24, 2019 11:13 am
by jay (support)
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.

Re: Matplotlib - Image Location Question

PostPosted: Thu Jan 24, 2019 12:25 pm
by DaveL17
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.)

Re: Matplotlib - Image Location Question

PostPosted: Thu Jan 24, 2019 1:10 pm
by autolog
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. :)