Comments (2)
in gr3.drawXXXmesh
, the colors must be given as a flattened array of 3-tuples for each mesh component drawn iiuc. why not allow an (N, 3)
array? it could be transformed into a flat view trivially?
from gr.
I am not certain that I understand your question correctly. Let's take gr3.drawconemesh
for an example:
colors = floatarray(colors)
...
_gr3.gr3_drawconemesh(c_uint(n), positions.data, directions.data, colors.data, radii.data, lengths.data)
The colors, like the other array-like parameters, are converted using the floatarray
helper class. For CPython, the following happens:
self.array = numpy.array(a, c_float)
self.data = self.array.ctypes.data_as(POINTER(c_float))
So anything can be used that can also be used to construct a numpy.array
of datatype ctypes.c_float
. The array shape is ignored, as GR3 only works with a pointer to the array's contiguous memory.
Could you provide an example which causes problems (N, 3)
shaped arrays?
And yes, sciapp/python-gr would be the fitting repository as it contains the current code for the GR and GR3 Python wrappers.
from gr.
Related Issues (20)
- Feature Request: Axis Shift/Offset Option HOT 1
- How can I use gr3.drawcubemesh? HOT 6
- LaTeX exponent position
- feature request: add Fira Math to the fontlist HOT 3
- [Enhancement] More control on colorbar, e.g. colorbar_ticks and colorbar_width HOT 1
- Reasons why text length is limited to 131 bytes (either latin1 or utf8) ? HOT 3
- [BUG] "Send: no error" display when reopen a plot. HOT 2
- incorrect normalization of cos(rotation), sin(rotation) in world coordinate transforms HOT 1
- [Discussion] What should I choose, OpenGL or GR3 HOT 6
- Get bbox box of objects HOT 2
- Installation dependencies on NixOS HOT 8
- Qt 6 support ? HOT 1
- Remove that camera rotation and tilt are integer degrees HOT 4
- GR is slower than MPL HOT 7
- Innacurate Drawing Of Some Chart Elements HOT 1
- Confirm file successfully written to or not - troubleshooting Julia/Plots/CI issue HOT 1
- Provide a verbatim mode
- soname versioning HOT 1
- Replace gethostbyname with getaddrinfo HOT 2
- Rotating polar plot coordinates? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gr.