-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature grid lines aka cartesian coordinate system #422
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #422 +/- ##
==========================================
- Coverage 96.19% 95.90% -0.30%
==========================================
Files 36 39 +3
Lines 1604 1661 +57
==========================================
+ Hits 1543 1593 +50
- Misses 61 68 +7
Continue to review full report at Codecov.
|
…into wik-feature-grid
For anyone subscribed: I've added an example as the main comment. I think it makes sense as a next step to use the |
PR Checklist
If you are contributing to
Javis.jl
, please make sure you are able to check off each item on this list:CHANGELOG.md
with whatever changes/features I added with this PR?Project.toml
+ set an upper bound of the dependency (if applicable)?test
directory (if applicable)?Link to relevant issue(s)
Closes #38 #302
How did you address these issues with this PR? What methods did you use?
One can now draw a grid given the points for the x and y axis. It's also possible to animate the creation of the grid but it's more an object that is just there now instead of everything build for animation like the current
draw_grid
function. I also removed thedraw_grid
function as I don't think it got used as it wasn't possible to have it in an non animated fashion.An example of using the new
coordinate_system
function:One thing that is a bit not so user friendly is that one needs to both have a variable for the coordinate system
cs
as well as for the object itselfcs_obj
to be able to use it inappear
.The PR includes a new folder and file
objects/CoordinateSystem.jl
and it can be template for similar objects which are of use for several people. Maybe it's something @gpucce is interested in as well for a JUtitls kind of thing.It uses a callable struct which calls
@JShape
but saves all the information in a struct which can be then used for animating it. For this you can have a look at the newappear
function which is also in theobjects/CoordinateSystem.jl
file.@TheCedarPrince let me know what you think about the general idea and I can add some more features like
disappear
at least but maybe also drawing ticks on the grid. I think a combination together with #412 would be helpful which I can add when one of them gets merged.As an example for that: Maybe define the coordinate system and pass it in as the 3rd argument of
scale_linear
which can replace the current 3rd and fourth argument. The other way around might also make sense as then the step size for the grid could be calculated such that there is a line for each increase by 1 in the coordinate system one wants to work with usingscale_linear
.Example
New example with easier syntax. One can create the mapping first and design the coordinate_system based on that.