i need to have more then one graph in a plot. so i pushed all point in a TripleField and arranged two different graphs with a CellField.
Now I want to have a blue graph and a red graph. Is there a possibility to color the cells or to set the color for the points?
Thank You!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would also like to know if it is possible to assign a color to each cell. I looked at the mesh2 example where one can set the colors based on a color map. Reading the Colors section in the manual I realize that every single point can be assigned an RGBA value based on the z-coordinate values. But, I would like to be able to assign a color for each cell depending on a different parameter (such as magnitude of current).
The reason for this is in my Computation EM problems I compute currents on each cell and I wish to assign a color for each cell based on the computed current.
Thanks,
uky_ka
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
it's quite simple… you just have to subclass QWT3D::Color and implement "operator()(double x, double y, double z)". you have to define your own constructor and pass the data elements you need (e. g. a pointer to your CellField). You store that pointer as member and then you can use it in the mentioned "operator()" :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hello!
i need to have more then one graph in a plot. so i pushed all point in a TripleField and arranged two different graphs with a CellField.
Now I want to have a blue graph and a red graph. Is there a possibility to color the cells or to set the color for the points?
Thank You!
I would also like to know if it is possible to assign a color to each cell. I looked at the mesh2 example where one can set the colors based on a color map. Reading the Colors section in the manual I realize that every single point can be assigned an RGBA value based on the z-coordinate values. But, I would like to be able to assign a color for each cell depending on a different parameter (such as magnitude of current).
The reason for this is in my Computation EM problems I compute currents on each cell and I wish to assign a color for each cell based on the computed current.
Thanks,
uky_ka
thats exactly what I need, maybe anyone has an idea?
got it :)
it's quite simple… you just have to subclass QWT3D::Color and implement "operator()(double x, double y, double z)". you have to define your own constructor and pass the data elements you need (e. g. a pointer to your CellField). You store that pointer as member and then you can use it in the mentioned "operator()" :)