Skip to main content
added 7 characters in body
Source Link
BlacKow
  • 6.5k
  • 20
  • 33

You can split your X interval into several subintervals and sample your function inside every interval with step equalproportional to current interval length. Then use ListPlot to show all sampled values and relabel X-axis ticks.

f[x_] := Sin[x] + 1.5; nPoints = 1000.0; edges = {0, 2 Pi, 10 Pi, 100 Pi}; intervals = Partition[#, 2, 1] &@edges; points = Flatten[ Range[#[[1]], #[[2]], (#[[2]] - #[[1]])/nPoints][[1 ;; -2]] & /@ intervals]; ticks = Transpose@{Range[1, Length@edges*nPoints, nPoints], edges}; Show[ListPlot[f /@ pointsShow[ListPlot[f[points], Ticks -> {ticks, Automatic}]] 

enter image description here

You can split your X interval into several subintervals and sample your function inside every interval with step equal to current interval length. Then use ListPlot to show all sampled values and relabel X-axis ticks.

f[x_] := Sin[x] + 1.5; nPoints = 1000.0; edges = {0, 2 Pi, 10 Pi, 100 Pi}; intervals = Partition[#, 2, 1] &@edges; points = Flatten[ Range[#[[1]], #[[2]], (#[[2]] - #[[1]])/nPoints][[1 ;; -2]] & /@ intervals]; ticks = Transpose@{Range[1, Length@edges*nPoints, nPoints], edges}; Show[ListPlot[f /@ points, Ticks -> {ticks, Automatic}]] 

enter image description here

You can split your X interval into several subintervals and sample your function inside every interval with step proportional to current interval length. Then use ListPlot to show all sampled values and relabel X-axis ticks.

f[x_] := Sin[x] + 1.5; nPoints = 1000.0; edges = {0, 2 Pi, 10 Pi, 100 Pi}; intervals = Partition[#, 2, 1] &@edges; points = Flatten[ Range[#[[1]], #[[2]], (#[[2]] - #[[1]])/nPoints][[1 ;; -2]] & /@ intervals]; ticks = Transpose@{Range[1, Length@edges*nPoints, nPoints], edges}; Show[ListPlot[f[points], Ticks -> {ticks, Automatic}]] 

enter image description here

Source Link
BlacKow
  • 6.5k
  • 20
  • 33

You can split your X interval into several subintervals and sample your function inside every interval with step equal to current interval length. Then use ListPlot to show all sampled values and relabel X-axis ticks.

f[x_] := Sin[x] + 1.5; nPoints = 1000.0; edges = {0, 2 Pi, 10 Pi, 100 Pi}; intervals = Partition[#, 2, 1] &@edges; points = Flatten[ Range[#[[1]], #[[2]], (#[[2]] - #[[1]])/nPoints][[1 ;; -2]] & /@ intervals]; ticks = Transpose@{Range[1, Length@edges*nPoints, nPoints], edges}; Show[ListPlot[f /@ points, Ticks -> {ticks, Automatic}]] 

enter image description here