cetz-package / cetz-plot

Create Plots and Charts with CeTZ
GNU Lesser General Public License v3.0
7 stars 1 forks source link

Feature Request: logarithmic scale in plot #3

Open konradmoesch opened 3 months ago

konradmoesch commented 3 months ago

I would like to use a logarithmic x-axis in a cetz plot. One example for a usage is bode plots, where the frequency (x-axis) is normally plotted logarithmically (10^(-3) to 10^3): image But it would also be useful for the y-axis, I think. TikZ supports this via xmode=log, for example, but maybe x-tick-step could be extended for log scaling.

agerlach commented 2 months ago

Same here, but for x- and/or y-axis

tapyu commented 2 months ago

In order to tackle semi-log and log-log plots at same time, an option scale can be created, where "x-log", "y-log", and "log-log" (or "xy-log"?) plot in logarithm scale in the x axis, y axis, and x and y axis, respectively. Other entries can be inserted to scale as new type of scales are requested.

johannes-wolf commented 2 months ago

Maybe someone can help with this? I do not have the time right now.

manuel5975p commented 2 months ago

Fine... I'll do it myself.

No guarantees :smile: but I'll see what I can do

JamesxX commented 1 week ago

Made a draft PR for my attempt here: #15. Input welcome