-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Node Shapes #136
Comments
I agree that this would be a major improvement to the current node shape infrastructure, thanks for sharing your thoughts! That said, I don't understand the specific implementation of your proposal. The current design is that Perhaps a different way would be that the user passes a function that accepts the coordinates+height+width of a node and returns the outline of the node as an array of tuples. There are a lot of legitimate ways to solve this problem, so we may have to consider a few different ideas before we land on the best one. Feel free to make a pull request with any work that you have done so far, since it makes it a lot easier to understand/review your thinking if I can see all of the code. If you aren't able to get the code to run, then just add a WIP label at the start of the pull request title, that way I will know not to merge. I can tell you right now that I like your idea at a high level, so if you make a pull request, you wont be at risk of it being rejected entirely. Once you have the pull request open, feel free to tag me and I will try to give you some pointers on how to get things working. |
Thank you for your input and the help. I think passing a function is a much better idea then passing the shape directly. In my approach, the scaled shape would have to be created by the user. So in the above Pull request I changed my example to work with a function taking Alas, I can't get it to work. Somehow, my custom nodeshape seems to be forwarded to the markershape of Plots.jl which passes it to GR. Are nodes plotted as markers? If so, I can't find the position in the code where they are passed to Plots.jl. Plots.jl wants something of the Type |
It would be great to have custom node shapes. I found that the current nodes are basically of type
Tuple{Float64, Float64}
. So Ithought this could be easily achieved by adding a new type
and add the last two lines of
here
GraphRecipes.jl/src/graphs.jl
Line 489 in 7210d36
However, this doesn't work. If I try to use it, a Error
is raised. I don't understand this error since I don't see any type restriction on
node_shape
.Is this a good way of solving the problem? Can you help me in understanding why the rises?
The text was updated successfully, but these errors were encountered: