4
$\begingroup$

This question already has an answer here:

  1. I need to change the format for representing numbers along the abscissa. I want to keep numbers 0,2,4,6,8,10 and put the degree, for example, on the tab "time, * 10 ^ 9 seconds" or keep numbers without a degree using the abbreviation "time, nanoseconds"

  2. Is it possible to put y1 (t) in the frame? Place it in the upper right corner for example.

See code below:

Plot[10^12*Sin[t/10^9], {t, 0, 10^10}, 
Axes -> None, Frame -> True, 
PlotStyle -> RGBColor[0., 0., 0.], 
FrameStyle -> Thick, 
PlotLabel -> Style["y1(t)", FontSize -> 18], 
PlotTheme -> "Detailed",
FrameLabel -> {"time", " Amplitude"}, 
LabelStyle -> {18, GrayLevel[0], 
FontFamily -> "Arial"}]
$\endgroup$

marked as duplicate by Fraccalo, MarcoB, Community Sep 12 at 5:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3
$\begingroup$

Does this give you the plot you want?

Plot[10^12*Sin[t/10^9], {t, 0, 10^10},
  Axes -> None,
  Frame -> True,
  FrameStyle -> Thick,
  FrameLabel -> {"time, nanosecs", "amplitude"},
  FrameTicks -> {{Automatic, None}, {{# 10^9, #} & /@ Range[0, 10, 2], None}},
  PlotLabels -> Placed["y1(t)", Above],
  PlotStyle -> Black,
  PlotTheme -> "Detailed",
  LabelStyle -> {18, Black},
  ImageSize -> Large]

 plot

Update

I'm not sure I understand what you mean by "large degrees ... along the ordinate", but maybe this will work for you; it uses the same basic idea that was applied to format the abscissa.

Plot[10^12*Sin[t/10^9], {t, 0, 10^10},
  Axes -> None,
  Frame -> True,
  FrameStyle -> Thick,
  FrameLabel -> {"time, nanosecs", Row[{"amplitude × ", Superscript[10, -12]}]},
  FrameTicks ->
    {{{# 10^12, #} & /@ Range[-1, 1, .5], None}, 
     {{# 10^9, #} & /@ Range[0, 10, 2], None}},
  PlotLabels -> Placed["y1(t)", Above],
  PlotStyle -> Black,
  PlotTheme -> "Detailed",
  LabelStyle -> {18, Black},
  ImageSize -> Large]

plot

Note

Since this is just a scaling problem, you should be aware that you can get the same plot with the following code.

In this version of the plot I have also replaced PlotTheme with the underlying options it was supplying because I believe PlotTheme works best when it is not mixed in with a lot of other options.

Plot[Sin[t], {t, 0, 10},
  Axes -> None,
  GridLines -> Automatic,
  GridLinesStyle -> 
    Directive[GrayLevel[0.4, 0.5], AbsoluteThickness[1], AbsoluteDashing[{1, 2}]],
  Frame -> True,
  FrameStyle -> Thick,
  FrameLabel -> {"time, nanosecs", Row[{"amplitude \[Times] ", Superscript[10, -12]}]},
  FrameTicks -> {{Range[-1, 1, .5], None}, {Range[0, 10, 2], None}},
  PlotLabels -> Placed["y1(t)", Above],
  PlotLegends -> LineLegend[{Black}, {HoldForm[10^12 Sin[t/10^9]]}],
  PlotStyle -> Black,
  LabelStyle -> {18, Black},
  ImageSize -> Large]

plot

$\endgroup$
  • $\begingroup$ Yes,thank you. Can you tell me how to remove large degrees on this graph and along the ordinate axis? $\endgroup$ – Andrew Marphichev Sep 11 at 6:14
  • $\begingroup$ @AndrewMarphichev. Please look at the update I have added. Does it resolve the issue you raise in your comment? $\endgroup$ – m_goldberg Sep 12 at 14:23
  • $\begingroup$ Yes,problem are resolved $\endgroup$ – Andrew Marphichev Sep 12 at 15:53
  • $\begingroup$ @AndrewMarphichev. I'm glad you find my answer useful. Please consider accepting it. You can do that by clicking on the check mark that appears on the left of the answer below the down arrow. $\endgroup$ – m_goldberg Sep 12 at 23:41

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