How to make Dynamic Plots?

Everything related to the development of modules in jamovi
Post Reply
asmpro
Posts: 9
Joined: Tue Jan 13, 2026 3:47 am

How to make Dynamic Plots?

Post by asmpro »

Hi,
I work on analysis that expanded according to variables provided and each variable need a separated plot
so how to make a dynamic plots according to variables?

and another question
Is there a way to make the plot not appear in jamovi until a condition met?
something like if statement but control the appear of plots
User avatar
jonathon
Posts: 2931
Joined: Fri Jan 27, 2017 10:04 am

Re: How to make Dynamic Plots?

Post by jonathon »

to make one plot per variable, you can do something like what's doing in the independent samples t-test. it creates an array of groups, but you can change this to an array of plots.

https://github.com/jamovi/jmv/blob/main ... #L458-L485

the key part is that the plots object is of type Array, and has items bound to the number of variables provided (i.e. items: (vars) ... where vars is the name of the option).

wrt visibility, easiest way is to bind the visibility like this:

visible: (optionName)

where optionName is the name of an option which is used to toggle the visibility.

cheers

jonathon
asmpro
Posts: 9
Joined: Tue Jan 13, 2026 3:47 am

Re: How to make Dynamic Plots?

Post by asmpro »

I Will try
Thanks
Post Reply