sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.41k stars 474 forks source link

graph1.plot() + graph2.plot() doesn't zorder correctly #6249

Open 93749b3a-c0a4-47a7-b178-004ba08b0b97 opened 15 years ago

93749b3a-c0a4-47a7-b178-004ba08b0b97 commented 15 years ago

Let G1 and G2 be arbitrary graphs. G1.plot() + G2.plot() and G2.plot() + G1.plot() (notice the ordering) look the same for me, ie I cannot make one graph appear above the other. What seems to happen is that the vertices are brought forward in the zorder, but it appears that this is done globally, not locally for the individual plot. I claim this is a bug.

CC: @sagetrac-ekirkman @rlmill @kcrisman

Component: graphics

Keywords: graph plot z order overlay

Issue created by migration from https://trac.sagemath.org/ticket/6249

5d2aaf09-c963-473a-bf79-1f742a72700f commented 15 years ago
comment:1

I'd just like to add that this bothers me too. I once tried to fix it and got confused and gave up.

vbraun commented 15 years ago
comment:2

I disagree. If you do not specify the z-order then there is no good way of automatically figuring out what to do. Amongst the multitude of possible behaviours you could even argue that G1.plot() + G2.plot() and G2.plot() + G1.plot() should be the same as addition is commutative.

Just do G1.plot(zorder=0) + G2.plot(zorder=1) or vice versa if you care about the z-ordering.

I recommend to close this bug.

kcrisman commented 13 years ago
comment:5

3251 seems to be related, though perhaps not a dup.