You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was thinking about implementing an automatically adjusting axis that also automagically selects a good scale. I am still thinking about how to implement in the most intuitive way:
#let graph_plot_test() = {let data = ((0, 0), (2, 2), (3, 0), (4, 4), (5, 7), (6, 6), (7, 9), (8, 5), (9, 9), (10, 1))
let x_axis =axis(min: auto, max: auto, step: auto, location:"bottom") // this should scale the x axis automatically
let y_axis =axis(min:0, max:10, step:2, location:"left", helper_lines:false)
let pl =plot(data: data, axes: (x_axis, y_axis))
graph_plot(pl, (100%, 25%))
graph_plot(pl, (100%, 25%), rounding:30%, caption:"Graph Plot with caption and rounding", markings: [#emoji.rocket])
}
So if the min, max and steps are not set, we could calculate this based on the data in the scatter_plot function for instance. I could try to implement this I just want to be on the same page API wise
It would be also nice if min and max are set to give the option to cut of data that is outside of this interval. Maybe introducing another parameter min_max_cutoff: true
You have some further suggestions?
The text was updated successfully, but these errors were encountered:
Can be done in prepare_plot to allow for all plots. The algorithm from chartist doesn't seem too bad. But what to do when not all parameters are auto? If one min/max is missing, just calculate the other in a similar fashion. And the step maybe misuse step a bit and just go for each x000 number or keep the min number precisely.
Can even be done by setting the plot box's clip: true. No calculations needed. Just don't render everything outside.
The algorithm will determine the min/max only for those that are not provided (none), otherwise it will just assume the provided min/max/steps as given. It should not make a big difference for the algorithm.
I just recall that once I used the algorithm from d3js this one might be more flexible. Depending what makes most of sense it uses either a $10^n$, $2^n$ or $5^n$ scale...
clip: true still poses some problems for me... But by giving the option of min: auto etc. this problem should be fixed
Are we on the same page or you have some further ideas? then I would write this and create a pull request when I am done.
I was thinking about implementing an automatically adjusting axis that also automagically selects a good scale. I am still thinking about how to implement in the most intuitive way:
min
,max
andsteps
are not set, we could calculate this based on thedata
in thescatter_plot
function for instance. I could try to implement this I just want to be on the same page API wisemin
andmax
are set to give the option to cut of data that is outside of this interval. Maybe introducing another parametermin_max_cutoff: true
You have some further suggestions?
The text was updated successfully, but these errors were encountered: