Comments (7)
Hi Teun. I'm glad you brought this up. I think now is a good time to think about renaming. I had previously got into the habit of putting periods before functions I didn't want to export, but this isn't really helpful within the roxygen ecosystem, and sometimes proves an annoyance, so we should probably remove the periods.
For the parameter names you mentioned, my thoughts are
include_line
->text_only
(needs flipped logically)cut_path
->gap
(short and doesn't need flipped logically)flip_inverted
->upright
offset
-> I think I'd keep this but maybe change the variable name to something else, likeoffset_paths
keep_straight
->straight
from geomtextpath.
putting periods before functions
I think this works for functions that you want to export but not expose. I think the typical way to indicate a function is internal is to declare the following in the roxygen comments:
#' @keywords internal
cut_path -> gap (short and doesn't need flipped logically)
This is nice and better than what I could come up with.
I think now is a good time to think about renaming
There are indeed some function in the package that have changed meaning over the course of development. I think .get_path_points()
doesn't really get points on a path but it places the text, so maybe a better name might be place_text()
? Perhaps .get_surrounding_lines()
could be make_gap()
? Any functions you'd like to mark for renaming?
from geomtextpath.
I don't really see the value of roxygen comments for non-exported functions. If no docs are built, then standard comments to help with maintenance and debugging should be adequate. It's reasonable to preface them with roxygen tags to help package building of course.
from geomtextpath.
I agree with your suggestions for .get_path_points
and .get_surrounding_lines
. I had wondered if the file name geometry_helpers.R
had become a bit inaccurate too, but I can't really think of anything more appropriate at the moment.
from geomtextpath.
Yes good point. I think splitting them out to text_placement.R
and path_handling.R
or something might be better. The path_handling.R
file can also get the dedup_path
, pathify
, prepare_path
and .add_path_grob
functions.
from geomtextpath.
I'll go and rename some of the parameters according to the suggestions, and maybe split the geometry_helpers.R
file.
from geomtextpath.
I think we can close this for now
from geomtextpath.
Related Issues (20)
- Option for line width and/or font size control when using 'size = ___' for geom_textsmooth() HOT 2
- geom_textsegment() with arrow() draws line to the top left of the plot HOT 4
- Denisty fill HOT 6
- label border? HOT 2
- geom_textsmooth() doesn't choose method if not explicitly set HOT 2
- Request something like "dodge" along path HOT 3
- Chinese character support HOT 3
- geom_labelsf() not recognizing aesthetics HOT 5
- While working with ragg, minuses aren't drawn HOT 2
- geom_textpath() always draw a empty box when label is ""
- Ignoring unknown parameters: text_smoothing HOT 10
- Feature request - multiple labels per line HOT 7
- geom_textsmooth computation fails if method argument is not specified HOT 3
- ggplot2 is separating size and linewidth HOT 2
- Negative values in geom_textcontour not appearing HOT 2
- geom_textlinerange HOT 1
- Question on angle HOT 1
- text_only in geom_labelsegment
- Feature request - avoid text overlapping
- two labels on same curve HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geomtextpath.