2
$\begingroup$

The graphic of this function is very condensed between $0\leq n\leq 500$. But it is more expansive among $500\leq n\leq 5000$.

How can I change the scale in two particular ranges of values in a graphic?

ListPlot[Table[Sin[50/n^2], {n, 1, 50, 0.01}]]

enter image description here

$\endgroup$
2
$\begingroup$

You can try:

ListLogLinearPlot[Table[Sin[50/n^2], {n, 1, 50, 0.01}]]

enter image description here

|improve this answer|||||
$\endgroup$
2
$\begingroup$
ListPlot[Table[Sin[50/n^2], {n, 1, 50, 0.01}], 
  ScalingFunctions -> {"Log"}]

enter image description here

|improve this answer|||||
$\endgroup$
1
$\begingroup$
ListPlot[
 Table[Sin[50/n^2], {n, 1, 50, 0.01}],
 Epilog -> Inset[ListPlot[
    Table[Sin[50/n^2], {n, 0.01, 1, 0.001}],
    Joined -> True, PlotStyle -> Red], {2800, .5}]
 ]

Of course you can place the Inset wherever you like by changing the coordinates.

Adjust the parameters as you like in the following:

ListPlot[
 Table[{n, Sin[50/n^2]}, {n, 1, 50, 0.01}],
 Epilog -> Inset[ListPlot[
    Table[{n, Sin[50/n^2]}, {n, 0.01, 1, 0.001}],
    Joined -> True, PlotStyle -> Red, AspectRatio -> 3, 
    ImageSize -> 100], {30, 0.5}],
 ImageSize -> 500
 ]
|improve this answer|||||
$\endgroup$

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.