Mixed scaled and normal coordinates in Mathematica?

Is it possible to indicate a position in terms of scaled coordinates in one direction and use the usual coordinates from my data points in another direction on the chart? In other words, I want to indicate the position where the x coordinate is the usual coordinate, and will change the position on the graph if the range of the graph is changed, but the y coordinate will be a scaled coordinate and will remain at a fixed height relative to the section.

+3
source share
1 answer

A little late, but is that what you are looking for?

data = {{1, 0.5}, {2, 0.7}, {3, 0.4}, {4, 0.2}};
Graphics[
  Line[data /. {x_, y_} :> Scaled[{0, y}, {x, 0}]],
  Axes -> True,
  PlotRange -> {Automatic, {0, 100}},
  AspectRatio -> Full
]
+4
source

Source: https://habr.com/ru/post/1718752/


All Articles