Add custom attributes to PlotCurveItem in pyqtgraph - pyqt

I have several curves on one PlotItem. I add them through method plot(). So each of them is a PlotCurveItem instance.
I would like to add additional information to certain curve in order to click on any it and get attribute. Moreover, I want to get attribure that corresponds to x,y of this curve.
Any ideas?

Related

We want to change the colour of the model with passing the DBId without selection. #AutodeskForge

In 3d Model of Autodesk Forge, We want to change the colour of the model with passing the DBId without selection. How can we do it? please help on this.. we are unable to find any reference on this.
If you already have a dbID of an object you'd like to color, you can use the viewer's setThemingColor method.
If you're asking about how to get dbIDs of objects without selecting them, there are different ways. For example, you can iterate through the scene hierarchy (as explained in this blog post), or obtain dbIDs of objects with specific properties (using the getProperties method).

Is it possible to support "rotated" table orientation in react-virtualized?

Is there currently a way to "rotate" the orientation of a table? Not dynamically, but just to configure it that way. By "rotate", I mean with headers on the left (in the first "column") and rows displayed to the right (in the second "column" and so on).
From this:
To this:
No. This is not supported by any built-in components. :)
But you can decorate Grid (like Table does) and build this type of interface.

How to subset a linnet object

I would like to subset a linnet object to get a list of linnet objects. In the helpfile I see that this is possible with a owin object. But I get errors as the syntax is not clear to me and also not clear is the use of snip argument in the call to subset.
I want to split linnet based on a user-attribute coming from marks or split a linnet object based on a windows (each window being a polygon from an shapefile)
Could someone please suggest how to subset a linnet based on a factor/window to get a list of linnet objects:
Using a user attribute/factor/mark on line segments.
Same values of marks are on contagious line segments, so this is ideally similar to using a window.
Using polygons as owin.
Thank you
If L is a network and P is a polygonal window then L[P] computes the intersection of L and P.
The help file for [.linnet includes examples which demonstrate the syntax of this command and which show the effect of the argument snip.

Changing pivot without transforming the geo

is it possible to modify/grasp the selected object pivot point (transform, rotate and scale) in which the pivots are pointing towards the camera that user selected/ via a list of cameras in the scene?
I wanted to try out it manually before I try converting into coding but the following method that I tried, was unsuccessful:
create a locator
constrain the locator to aim in the way of the camera that I wanted it to point to
parent the geo to the locator
Freeze Transform on the geo and unparent it from the locator
While the method kinda work, in which is is pointing towards the camera, but the geo was rotated. I tried copying rotational values into the rotate axis, either the geo got rotates, or zero-ing out the rotational values, it is back to square one.
Any ideas?
This is how i'd do it with python, if you want it coded.
This'll move your object's pivot without moving the object itself:
import maya.cmds as mc
mc.xform ('objectPivotYouWantToMove', piv=((mc.xform ('objectWhereYouWantPivotToBe', q=1, ws=1, piv=1))[0], (mc.xform ('objectWhereYouWantPivotToBe', q=1, ws=1, piv=1))[1], (mc.xform ('objectWhereYouWantPivotToBe', q=1, ws=1, piv=1))[2]))
What this does is moves the pivot of one object and puts it in the position of another's without moving the geo/shape.
If you want to move it without script select your object and then press the insert key. you can now move the pivot free of the object, if you hold down 'v' you can snap it to another.
Hope this helps!

How do you access THREE.Geometry?

How can you create a multi faceted object like say in a shape of the mountain? Without resorting to something like THREE.PlaneGeometry? Can you use THREE.Geometry instead?
Three.PlaneGeoemtry is only a preset for the user that already generates the vertex positions and UV-coordinates for you. For creating a mountain, you should stick to Three.PlaneGeometry and move the vertices up and down, depending on some height values of any kind you wish (function, or height map texture or whatever). You could also create your own Three.Geometry object but in the end, I think, you will end up with something very close to PlaneGeometry.

Resources