Skip to main content
added 47 characters in body
Source Link
Domen
  • 33.4k
  • 3
  • 47
  • 66

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,...,figure4]

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[]'Show[], as this facilitates commenting/uncommenting part of the code for various uses. But 'show'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?

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,...,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?

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?

added 232 characters in body
Source Link
feynman
  • 239
  • 1
  • 7

figure=Plot[xSuppose I have the following code and I want to show them in the same picture.

figure1=Plot[x,{x,0,1}];

The above is the preceding codefigure2=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,...,figure4]

1. How to add the following info sequentiallyI want to this existing 'figure'? Rather than putting these featuresput all togetherplot options outside 'Show[]', as this facilitates commenting/uncommenting part of the code for various uses.

1 But 'show' only fully respects the 1st argument.an epilog How to keep all plot options in each of these figures intact?

2.aHow to fill that missing line?

figure=Plot[x,{x,0,1}];

The above is the preceding code. How to add the following info sequentially to this existing 'figure'? Rather than putting these features all together, this facilitates commenting/uncommenting part of the code for various uses.

1.an epilog

2.a line

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,...,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?

edited title
Link
user64494
  • 29.1k
  • 4
  • 29
  • 56

how How to sequentially add extra info (epilog etc) on existing plot?

Source Link
feynman
  • 239
  • 1
  • 7
Loading