Feature grid lines aka cartesian coordinate system#422
Feature grid lines aka cartesian coordinate system#422
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.mdwith whatever changes/features I added with this PR?Project.toml+ set an upper bound of the dependency (if applicable)?testdirectory (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_gridfunction. I also removed thedraw_gridfunction 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_systemfunction:One thing that is a bit not so user friendly is that one needs to both have a variable for the coordinate system
csas well as for the object itselfcs_objto be able to use it inappear.The PR includes a new folder and file
objects/CoordinateSystem.jland 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
@JShapebut saves all the information in a struct which can be then used for animating it. For this you can have a look at the newappearfunction which is also in theobjects/CoordinateSystem.jlfile.@TheCedarPrince let me know what you think about the general idea and I can add some more features like
disappearat 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_linearwhich 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.