I tried before, searched the Vegalite.jl documentation, searched the original Vegalite documentation (and tried to convert some code), considered somewhat directly using JSON-like code, and didn’t succeed in this matter. I left it alone for a while because it wasn’t so important at the time.
Now it has become important: what is the most direct and easy code example to control ticks with Vegalite.jl?
(Can you also use a range with steps to signify ticks?)
(Is there any plan to expand the existing Vegalite.jl documentation, or even fully translate the original Vegalite documentation?)
You can get the documentation for the other options here. Let me know if that helps you get started!
I think you should be able to use a julia range as the value for values.
Any help with expanding the documentation would be super welcome. I don’t think I’ll have much time to spend on that in the near future. I also thought whether there might be some way to auto-translate the original documentation and incorporate that into the Julia docs, but never really had enough time to explore that option. I think Altair (the python wrapper for vega-lite) does that, but not sure.
There still seems to be a problem, as I cannot enforce e.g. the X axis ticks beyond the automatically detected visual reach of data. For example, SepalLength in the iris set goes up to 8, but I cannot set the X ticks to reach 10. (I used values = collect(2:10), or just 2:10, which does start the X ticks at 2, but also leaves a big blank space to the left between 2 and the undesired 0.)
The range way with a step also does not work, and totally removes the ticks (in this case on the Y axis).
I think I am not qualified to help you at the moment. I still need to get better at Vegalite.jl.
Try to use values = 0:50:600 instead of values = [0:50:600].
The expression [0:50:600] creates an array of ranges, which is not what you want to pass here (you can also think of that as an array of arrays). The expression 0:50:600 creates just a range, and any range is a subtype of AbstractArray, so you are passing an array of ticks in that case.
With that change the plot looks good on my system.