-1

I am using implicitplot in Maple using this command:

implicitplot(diffr, 0. .. 1, 0. .. 1.0, filledregions = true, coloring = [cyan, yellow]);

So, when diffr<0 and diffr>0, I received a diagram with cyan and yellow colors respectively. The issue is that when diffr=0, I receive black which is the default color. Can you advise how I can change the black?

I am trying to see how the color for the indifferent region can be changed in the Maple implicitplot.

1 Answers1

0

Here are two ways. I'm using a made-up example since you haven't supplied one; it's quite possible that your example might behave differently, in a way that I haven't guessed.

The first retains the curve that might separate the cyan and yellow portions, which gets the same color as the default (zero) portion.

The second combines the original with a second plot, containing the zero portion. It removes all CURVES substructures, allowing the second plot to be visible. This duplicates some computational effort, but produces a cleaner look IMO.

The "zero" portion in the first approach is made up of many tightly packed curves, giving it a hatched appearance if the plot size is default size. I don't know whether that's acceptable to you.

restart;
with(plots):

diffr := (x,y)->piecewise(x<1/4,0,x>1/4,x-1/2,x>3/4,1):

implicitplot(diffr, 0. .. 1, 0. .. 1.0,
         filledregions = true, color=purple,
         coloring = [cyan, yellow]);

enter image description here

subsindets(display(
  implicitplot(diffr, 0. .. 1, 0. .. 1.0,
               filledregions = true,
               coloring = [cyan, yellow]),
  inequal({'diffr'(x,y)<=0,'diffr'(x,y)>=0},
          x=0..1, y=0..1,
          color=purple)
    ), specfunc({AXESLABELS,CURVES}),
 ()->NULL);

enter image description here

acer
  • 6,671
  • 15
  • 15