Suppose I have the following code and I want to show them in the same picture.
figure1 = Plot[x, {x,0,1}];
figure2 = Plot[2x, {x,0,1}, Epilog->Circle[]];
(* * some missing line* *)
(* when this line is uncommented, it removes epilog in figure 2 *)
figure3 = Plot[3x, {x,0,1}, Epilog->Triangle[]];
figure4 = Plot[4x, {x,0,1}, Epilog->Line[{{0, 0}, {1, 1}}]];
Show[figure1, figure2, figure3, figure4]
1.I want to put all plot options outside Show[]
, as this facilitates commenting/uncommenting part of the code for various uses. But Show
only fully respects the 1st argument. How to keep all plot options in each of these figures intact?
2.How to fill that missing line?
Show
for example. Also you can add to a plot using Epilog command. But this has to be made at the time the initial plot is created. Not afterwords. $\endgroup$Show
. It can be nested as many times as you want:Plot[x, {x, 0, 1}]
thenShow[%, Epilog -> Triangle[]]
thenShow[%, Graphics[{Transparent, EdgeForm[Red], Disk[]}]]
and so on. Also, read the tutorial about Combining Plots or Combining Graphics. $\endgroup$