Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 16:26
    kmuehlbauer commented #1568
  • Jan 31 2019 16:15
    kmuehlbauer commented #1568
  • Jan 31 2019 15:53
    djhoese commented #1568
  • Jan 31 2019 15:46
    kmuehlbauer edited #1568
  • Jan 31 2019 15:44
    kmuehlbauer opened #1568
  • Jan 31 2019 15:32
    djhoese commented #1566
  • Jan 31 2019 15:30
    djhoese commented #1567
  • Jan 31 2019 14:18
    GuillaumeFavelier commented #1561
  • Jan 31 2019 14:15
    GuillaumeFavelier commented #1561
  • Jan 31 2019 12:46
    opekar synchronize #1130
  • Jan 31 2019 09:54
    kmuehlbauer commented #1567
  • Jan 31 2019 09:53
    kmuehlbauer synchronize #1567
  • Jan 31 2019 09:37
    kmuehlbauer labeled #1567
  • Jan 31 2019 09:37
    kmuehlbauer labeled #1567
  • Jan 31 2019 09:37
    kmuehlbauer labeled #1563
  • Jan 31 2019 09:36
    kmuehlbauer labeled #1563
  • Jan 31 2019 09:28
    kmuehlbauer commented #1567
  • Jan 31 2019 09:27
    kmuehlbauer synchronize #1567
  • Jan 31 2019 09:19
    kmuehlbauer assigned #1563
  • Jan 31 2019 09:17
    kmuehlbauer opened #1567
ViNOJ DAViS
@ViNOJ-DAViS
Thank you @kmuehlbauer it works perfectly and i have accepted that anwser on SO
Kai Mühlbauer
@kmuehlbauer
@ViNOJ-DAViS you might have a look every once in a while at the PR I linked above. I want to finish this in August also for the impostor method. Good chance that there might be some simplifications and/or additions.
ViNOJ DAViS
@ViNOJ-DAViS
Yeah I will.. Thanks
Pi
@p-i-
https://vispy.org/getting_started/plot.html
^ "... coming soon"
This is kinda core doc, no? How to code a "Hello World" plot with vispy...
David Hoese
@djhoese
@p-i- You'll have to check the examples in the vispy repository. We are a small team with limited time and haven't had time to include all of this information. If you are attending the SciPy 2021 conference this year (going on now) we are doing a sprint on Saturday and Sunday as part of the conference. This could be a task to be worked on.
Pi
@p-i-
haha yes I know too well what it's like to work with limited resources.
I've moved from hybriddesktop/mobile/fullstack to 90% numpy/python/visualizations lately and I'm fascinated to find this project.
Previously I used https://github.com/unconed/mathbox but the cognitive load / learning curve (and lack of community) fried my brain.
I just can't guarantee to deliver on time with that tech as it rabbitholes everywhere.
Pi
@p-i-

I'm working on 2 projects that I might be able to migrate to vispy.
First one is plotting points. Each point is a trade. Intensity is volume.
A few thousand dots per frame.
I get 20-30fps rendering into an XxYxRGB numpy array and blitting it to screen thru opencv. And I can catch mouseclicks.
But it gets sluggish as I increase the dots.
And I have to do numpy voodoo for multiple trades occupying the same pixel, that I'd love to gut out from my code.

And the other, same deal just plotting an array of coloured rectangles.
It's for visualizing a stock graph, the rectangles represent trades or orderbook info.
And I click on a trade to zoom into it & observe market activity in close temporal proximity to that trade. I want to do this as an overlay.
I figured I can pass a numpy vertex array into a shader.

Pi
@p-i-
@djhoese it might be an idea to package all of the examples as a handful of .ipynb-s. That way,
(1) it's really easy for people to simply run the notebook, and see everything on offer.
(2) it's possible to publish the notebook with output, just render it to HTML, so it could double as doc.
I know that with small teams it's a pressure to update doc (& so it can get out of sync), as limited resources should be focused on the trunk.
Pi
@p-i-
Too late to get into the scipy conf :(
gotta start using a calendar.
David Hoese
@djhoese
@p-i- Thanks for the suggestions. There is an issue on github already about updating the gallery for the vispy website with more of the example scripts (something on the todo list for the scipy sprint). The problem or confusion that notebooks cause is that vispy's jupyter widget is experimental and does not currently function very well. I would not want people to think that they should expect everything in vispy to work in a jupyter widget. If the widget backend wasn't used then a separate window is popped up which can just be awkward. Lastly, some of the cool stuff in vispy is done by embedding it into a larger Qt (or other GUI framework) application
Pi
@p-i-
How to plot a large array of rectangles (several thousand), each of a custom color?
And how to plot a large array of points, so that if multiple points land on the same pixel the intensities add?
Pi
@p-i-
vispy/examples/demo/gloo/quiver.py ... mouse coords are off by a factor of 2 on my MacBookPro. Might be a retina-screen thing.
Also two_qt_widgets.py segfaults: RuntimeError: OpenGL got errors (Check before draw): GL_INVALID_VALUE
Pi
@p-i-
vispy/examples/demo/scene/oscilloscope.py gives ModuleNotFoundError: No module named 'OpenGL'
So does scrolling_plots.py
Pi
@p-i-
vispy/examples/demo/gloo/offscreen.py gives RuntimeError: Could not import backend "Glfw":
Everything else seems to work from /examples
Kai Mühlbauer
@kmuehlbauer
@p-i- Thanks for doing these tests. For the last gloo example, you would need to install glwf backend. But sure we should give a more nformative error message.
For the oscilloscope you might need pyopengl installed.
Kai Mühlbauer
@kmuehlbauer
Regarding the rectangles, do you have any constraints? Are they all same size? You might look into collections for that. Not sure, if different colors can be achieved with Markers Visual, so that might be another option.
Pi
@p-i-
@kmuehlbauer Different sizes, different colors. But they will all be horizontally or vertically aligned.
I'm thinking it's maybe not too much work to write shaders.
Each rect is 2 triangles, and it's not too far off from a 'hello world'.
Can I pass vertex-array as a np.array?
Pi
@p-i-
hm maybe SegmentCollection is good for the rectangles.
Kai Mühlbauer
@kmuehlbauer
Yes, it should be no separate Visuals but a collection. Each visual is treated as separate GL program and this affects performance if there are hundreds or thousands of them. A collection circumvent this by using only one program to draw all items. You might skim through the vispy issues. There have been discussions recently (this and last year I think).
Pi
@p-i-
How come most of the examples work but a couple errror with 'ModuleNotFoundError: No module named 'OpenGL''?
David Hoese
@djhoese
@p-i- You probably need pyopengl which I think is listed as an optional dependency of vispy
Pi
@p-i-
Yes, but all the examples are using GL, right?
Why do a small number of them require OpenGL? What are the others using?
David Hoese
@djhoese
pyopengl != OpenGL (the technology)
pyopengl is a library and some parts of vispy use it. Other parts, most parts, use a custom linking to your systems GL libraries
@p-i- ^
Pi
@p-i-
Is there any documentation for plotting?
Other than looking at the examples / drilling into the source code...
David Hoese
@djhoese
@p-i- No. Sorry. Examples are vispy's main way of describing things at the moment
the plotting interface as a whole is very limited and unfinished. It was put together by the original vispy developers as a proof of concept but needs a lot of work
BaiSource
@BaiSource
image.png
BaiSource
@BaiSource
I want use python program switch to graphics card?How to switch ?
image.png
BaiSource
@BaiSource
I do not use this way,Because I package my PyQt program to exe, GL version is not NVIDIA .
Pi
@p-i-
I reverted to doing it with matplotlib for the time being (as I have a deadline):
https://stackoverflow.com/questions/68404385/dynamically-redraw-second-axis-subfigure-upon-click-event-in-first-in-matplotlib
I would be interested to know how much work it involves to achieve this with vispy.
If anyone's interested to take it on as a contract, do message me.
@djhoese I like the pattern of 'doc-thru-code'.
I kinda wish all doc was centered around this.
It cuts out using English as an intermediate language.
David Hoese
@djhoese
@BaiSource Keep reading the documentation below that section. There is a Windows section and Linux section that describe switchable graphics for those platforms. The easiest solution is to configure your sysyem to use the nvidia gpu for everything. This isn't a vispy thing, it is up to your system to tell vispy what it should use.
David Hoese
@djhoese
@p-i- I'm not really sure what you expected, but coming to a volunteer open source project on a deadline is rarely going to go well. And I'm not sure if you're criticizing our documentation or saying you like the examples. I've already said we have limited time and that we're working on the documentation so repeating that our docs aren't up to your standards isn't accomplishing anything except making me feel bad. If you have improvements in mind and they aren't already in github issues please make some. Even better, submit a pull request to improve what you can.
Glad you got something working though.
Bakkiaraj Murugesan
@bakkiaraj

is there a way to use Qt QML backend? Qt QML uses QML Item , Its also possible to get the QML to create framebuffer, I am very new to OpenGL , used Pyvista , Pyqtgraphs with Qt widgets, I am looking for options to move to QML (preferably with Qt6). Looks like pyvista with QML is complicated as the way VTK works, Vispy seems much promising with both 2d charts (line charts) and 3d charts (surface mesh).

Some more details are https://stackoverflow.com/questions/68517058/can-not-get-pyvista-render-to-work-with-qt-qml-qquickframebufferobject , I am willing to contribute but could not get where to start.

David Hoese
@djhoese
@bakkiaraj I've commented on your issue here: vispy/vispy#2157
Bakkiaraj Murugesan
@bakkiaraj
Thanks @djhoese, I will continue conversation in the vispy/vispy#2157 .
Eric Younkin
@ericgyounkin
Is there an ambient_light_color attribute for a MarkersVisual, similar to what is discussed here? https://stackoverflow.com/questions/39112197/add-ambient-light-to-vispy-scene
My MarkersVisual appears to be lighted from a direction I can't figure out how to control, I'm just trying to figure out ambient lighting for my Visual.
image.png