-
Notifications
You must be signed in to change notification settings - Fork 62
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
WIP: bitmap nodes #75
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #75 +/- ##
===========================================
- Coverage 48.21% 16.46% -31.75%
===========================================
Files 3 8 +5
Lines 168 498 +330
===========================================
+ Hits 81 82 +1
- Misses 87 416 +329
Continue to review full report at Codecov.
|
@@ -216,9 +225,11 @@ function gplot(g::AbstractGraph{T}, | |||
compose(context(units=UnitBox(-1.2, -1.2, +2.4, +2.4)), | |||
compose(context(), texts, fill(nodelabelc), stroke(nothing), fontsize(nodelabelsize)), | |||
compose(context(), nodes, fill(nodefillc), stroke(nodestrokec), linewidth(nodestrokelw)), | |||
#compose(context(), nodes), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why that?
if nv(g) == 1 | ||
return [0.0], [0.0] | ||
else | ||
# Discard the extra angle since it matches 0 radians. | ||
θ = range(0, stop=2pi, length=_nv(G)+1)[1:end-1] | ||
θ = range(0, stop=2pi, length=nv(g)+1)[1:end-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, we really need more tests, so errors like this one do not get unnoticed.
That's an interesting addition. Is there a way, that also compose contexts could be used instead of bitmap? (not sure if we would need that though). I think the problem with the gray line under the transarent logos is, that we currently don't handle self loops correctly. |
I am not expert on Compose.jl. I wanted to have a plot with logos and made quick and dirty solution. I am willing to finalize it, if you think it's a good addition. Some tests should be added but I don't have an idea how to test it. Now spending Christmas with my family and left my computer home. |
bump @TeroFrondelius, now that two Christmas have passed |
If someone wants to finalize this please feel welcome. I don't remember the details anymore and it seems that I won't find time to work on this. |
I know it's an old thread, but just wanted to say this feature would be incredibly useful! Busy at the moment, and don't have much programming skills, but maybe in the future I could help look at it. But maybe someone else too! |
Answering #74
usage example:
The current problem is the horizontal light gray line under the logos especially if the logo is transparent like highest one at the above picture.
Another usage example:
Third example: