Skip to content
Discussion options

You must be logged in to vote

First of all, place the drawing primitives into the child window that you want to draw on. Use a dpg.drawlist as a parent. Then, since you want to draw on top of the plot, you need to overlay two items. This can be done in multiple ways, the easiest is to specify pos on one of the the widgets. Your drawlist should go after the plot because the items are rendered in the order they are created (if they belong to the same slot). Also, for some reason pos on drawlist didn't work for me, probably due to a bug. This can be circumvented by placing it into a group an specifying pos on that group.

Now, gathering this all together...

import dearpygui.dearpygui as dpg

dpg.create_context()
with dpg.w…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by mnimonah
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@mnimonah
Comment options

@v-ein
Comment options

v-ein Jun 24, 2025
Collaborator

@mnimonah
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants