jsxgraph / json2D_JSXGraph

JSON 2D Graphics interface for JSXGraph
MIT License
3 stars 1 forks source link

Beautify Log/Log list plots with bad X scale #10

Open axkr opened 1 year ago

axkr commented 1 year ago

Please beautify Log/Log list plots with bad X scale.

Also the origin of the plot is set in point (1,1) but should be set in (0,0).

https://jsfiddle.net/axelclk/nfsheak0/

image

axkr commented 1 year ago

This problem still exists:

Also the origin of the plot is set in point (1,1) but should be set in (0,0).

Any suggestions how to tackle this? Do we need to provide more information in the data to make this easier for jsxgraph?

alfredwassermann commented 1 year ago

Please apologize my ignorance. My understanding is that $(1,1)$ = $(e^0, e^0)$ and therefore the point $(1,1)$ is at the x-/y-intercept of a log / log scale axis.

axkr commented 1 year ago

Please apologize my ignorance. My understanding is that ...

yes I think I've used a wrong example.

I created this new jsFiddle:

For the x/y scales I think I need a possibility to calculate the x/y "inverse" scales with the exp function.

"axes": {
    "hasaxes": [true, true],
    "scaling": ["exp", "exp"]
  },

Is there a general way to define a "mapping function" for the scales, which can be calculated by jsxgraph? For example defining formulas for x and y like "scaling": ["exp(x)", "y^10"] or something similar ?