traitsui

Chaco - Getting multiple data series to use the same axes and maps

*爱你&永不变心* 提交于 2019-12-08 13:48:17
问题 I am trying to plot several collections of data on a single plot. Each dataset can be represented as an x-series (index) and several y-series (values). The ranges of x and y data series may be different in each data set. I want to have several of these data sets display on one plot. However, when I simply add the second plot object to the first (see below) it makes a second axis for it that is nested inside the plot. I want both plots to share the same axis and for the axis bounds to be

traitsui prevent txt-box from realtime updating

梦想与她 提交于 2019-12-08 07:37:42
问题 Frequently when using traitsui, i have a depends_on relationships that are somewhat costly, and i would to Not update the trait with every character entry of a text-box. For example, if i have a Int which is used in a calculation, through depends_on linkage, the linkage is actuated every time i add a digit to Int. currently i circumvent this by using buttons, but am curious if there is there a way to defer updating everything until the user hits enter or changes focus of the UI. thanks, alex

enabled_when listening outside model object

和自甴很熟 提交于 2019-12-08 05:24:49
问题 I found a workaround to my original problem but I am hoping someone else can explain what is going on. I originally noticed that enabled_when , and I'd imagine visible_when also, appears to take effect in response to trait events originating from the model object only. If the event originates from some other object, even if the editor refers to it, it doesn't seem to be propagated correctly. class DirectObjectPronoun(HasTraits): text=Str typable=Bool(False) traits_view=View( Item(name=

Multi Object View Behaviour - Creating an Editor for a HasTraits subclass

北战南征 提交于 2019-12-08 04:28:39
问题 I am currently trying to make a traitsUI GUI for a class that contains many instances of a single object. My problem is very similar to the one solved in MultiObjectView Example TraitsUI. However, I don't like the idea of using a context as it requires me to write out the same view many times for each object I have (and I might have a lot). So I tried to edit the code to make it so that each Instance of the House object would default to looking like its normal view when it is viewed from the

Multi Object View Behaviour - Creating an Editor for a HasTraits subclass

跟風遠走 提交于 2019-12-06 15:03:40
I am currently trying to make a traitsUI GUI for a class that contains many instances of a single object. My problem is very similar to the one solved in MultiObjectView Example TraitsUI . However, I don't like the idea of using a context as it requires me to write out the same view many times for each object I have (and I might have a lot). So I tried to edit the code to make it so that each Instance of the House object would default to looking like its normal view when it is viewed from the Houses object. It almost worked, except now I get a button that takes me to the view I want rather

Using TraitsUI in Mayavi to create a GUI, magnetic field simulation

末鹿安然 提交于 2019-12-04 16:46:55
I am currently working on a project that I have to simulate the magnetic field produced by a circular wire loop. I have written a piece of code and put it into a class, that works perfectly, but when I try to create a GUI using TaitsUI, it just fails. I have no idea how should I connect the one to the other. class Wireloop: x,y,z = np.mgrid[-10:10:150j, -10:10:150j, -10:10:150j] ### Transform to Cylindrial Polar r = np.sqrt(x**2 + y**2) # ρ in polar x_trans = x/r # cos(θ) y_trans = y/r # sin(θ) """ """ def __init__(self, R, I): self.R = R #radious self.I = I #DC current #Constants self.mew0 =