Plots: bring forward, send backward

Hello,

I need to plot a solid circle on a line. The problem is that you can see the line through the circle:

with(plots):
with(plottools): 
l := plot(x,color=red,thickness=3): 
d:=disk([0.5, 0.5],0.05,color=black): 
display({l, d},view=[0..1,0..1]);

I think I need something which is called in Microsoft Office products "Bring Forward (or to Front)" and "Send Backward (to Back)"

I suppose it's something very simple but I just cannot find it!

Thank you!

I'm afraid not

I'm afraid that function isn't currently available in Maple.

David Clayworth Maplesoft GUI Developer

dot on line alternative

For this particular situation, if the only need is to get a large dot on a line, one could do something like:

l := plot(x, color = red, thickness = 3);
d := pointplot([.5, .5], symbol = solidcircle, symbolsize = 70);
display([l, d], view = [0 .. 1, 0 .. 1]);

 

 

dot on line alternative #2

You could also transform the dot and line to 3d objects where the dot is a little bit above the (x,y) plane where the line is situated, and project down:

 

with(plots):
with(plottools):

l := plot(x,color=red,thickness=3):
d:=disk([0.5, 0.5],0.05,color=black):

l3d:=transform((x,y)->[x,y,0])(l):
d3d:=transform((x,y)->[x,y,0.1])(d):

display(l3d,d3d,axes=boxed,view=[0..1,0..1,0..0.2],orientation=[-90,0]);
 

Thank you!

Thank you, Tim and Alex!

This is kind of tricks I was trying to get (though I would never think of transforming it in 3d!)

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}