1
$\begingroup$

I am trying to plot several curves and show them in the same figure, but parts of curves being cut off by the frame and not showing fully.

I am using the commands Plot and Show

P24 = Plot[Evaluate[FT /. sol7], {t, -20, 20},
  FrameLabel -> {"t(s)", "FT(pN)"}, 
  Frame -> True,
  PlotStyle -> {Orange, Thick}, 
  PlotRange -> Full]
P25 = Plot[Evaluate[Fz /. sol7], {t, -20, 20},
  FrameLabel -> {"t(s)", "Fz(pN)"}, 
  Frame -> True, 
  PlotStyle -> {Orange, Thick}, 
  PlotRange -> Full]
P26 = Plot[Evaluate[FT /. sol8], {t, -20, 20}, 
  FrameLabel -> {"t(s)", "FT(pN)"}, 
  Frame -> True, 
  PlotStyle -> {Black, Thick}, 
  PlotRange -> Full]
P27 = Plot[Evaluate[Fz /. sol8], {t, -20, 20}, 
  FrameLabel -> {"t(s)", "Fz(pN)"}, 
  Frame -> True, 
  PlotStyle -> {Black, Thick}, 
  PlotRange -> Full]
P28 = Plot[Evaluate[FT /. sol9], {t, -20, 20},
  FrameLabel -> {"t(s)", "FT(pN)"}, 
  Frame -> True, 
  PlotStyle -> {Yellow, Thick}, 
  PlotRange -> Full]
P29 = Plot[Evaluate[Fz /. sol9], {t, -20, 20},
  FrameLabel -> {"t(s)", "Fz(pN)"}, 
  Frame -> True,
  PlotStyle -> {Yellow, Thick}, 
  PlotRange -> Full]
P30 = Plot[Evaluate[FT /. sol10], {t, -20, 20}, 
  FrameLabel -> {"t(s)", "FT(pN)"}, 
  Frame -> True, 
  PlotStyle -> {Pink, Thick}, PlotRange -> Full]
P31 = Plot[Evaluate[Fz /. sol10], {t, -20, 20},
  FrameLabel -> {"t(s)", "Fz(pN)"}, 
  Frame -> True,
  PlotStyle -> {Pink, Thick}, 
  PlotRange -> Full]
P32 = Plot[Evaluate[FT /. sol11], {t, -20, 20},
  FrameLabel -> {"t(s)", "FT(pN)"}, 
  Frame -> True,
  PlotStyle -> {Red, Thick}, 
  PlotRange -> Full]
P33 = Plot[Evaluate[Fz /. sol11], {t, -20, 20}, 
  FrameLabel -> {"t(s)", "Fz(pN)"}, 
  Frame -> True,
  PlotStyle -> {Red, Thick}, 
  PlotRange -> Full]
P34 = Plot[Evaluate[FT /. sol12], {t, -20, 20}, 
  FrameLabel -> {"t(s)", "FT(pN)"}, 
  Frame -> True, 
  PlotStyle -> {Green, Thick}, 
  PlotRange -> Full]
P35 = Plot[Evaluate[Fz /. sol12], {t, -20, 20}, 
  FrameLabel -> {"t(s)", "Fz(pN)"}, 
  Frame -> True, 
  PlotStyle -> {Green, Thick}, 
  PlotRange -> Full]

p38 = Show[P24, P26, P28, P30, P32, P34]
p39 = Show[P25, P27, P29, P31, P33, P35]

In the plots made with Show, parts of curves are missing, especially from the top of the figure. Look to the red and black curves.

enter image description here

Also, I want the scale of the x-axsis to be -20 , -15, -10, -5,0, 5, 10, 15, 20. I tried to use Ticks, but it didn't work.

Ticks -> {{-20, -15, -10, -5, 5, 10, 15, 20}, {-0.2, -0.1, 0.1}}

Also, if there is any way to make the curves clearer, please tell me

$\endgroup$
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Dr. belisarius Nov 15 '14 at 16:53
2
$\begingroup$

This is more Mathematica-ish, and doing it this way you won't be risking to get those scaling problems:

sols = Table[ {FT -> i Sin@x, Fz -> i Cos@x}, {i, 7, 12}];
(* in your case
   sols = {sol7, .... sol12};
   but I bet you already had them as a single list at an earlier stage in your program and
   you decided to assign a different symbol to each one
*)
cols = {Orange, Black, Yellow, Pink, Red, Green};
Plot[Evaluate[Transpose[{FT, Fz} /. sols]], {x, -2, 2}, PlotStyle -> cols]

Mathematica graphics

$\endgroup$
  • $\begingroup$ thanks alot,but my system is more complex so I did not know how to use slos $\endgroup$ – Yaya Nov 15 '14 at 5:41
  • $\begingroup$ @Yaya "Slos"? I guess you mean "sols". It doesn't matter. Just do sols = {sol7, sol8, ..., sol12} and then use my last two lines. $\endgroup$ – Dr. belisarius Nov 15 '14 at 5:53
  • $\begingroup$ yes sorry I mean sols ,I added my system above , the thing that change is [CapitalOmega]c $\endgroup$ – Yaya Nov 15 '14 at 10:14
  • $\begingroup$ thanks alot it is work now,do you know any way to change the scale of axsis? $\endgroup$ – Yaya Nov 15 '14 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.