Comments (10)
Thanks for writing.
Are you able to provide a reproducible example?
Using your code with a made-up data set of the same variables gives me the expected result:
set.seed(1234)
dt <- data.frame(year = rep(2015:2020, 3),
val = c(replicate(3, runif(6))),
Series = factor(paste("Series", rep(1:3, each = 6))))
library(geomtextpath)
#> Loading required package: ggplot2
ggplot(dt, aes(x = year, y = val)) +
scale_color_brewer(palette="Set1") +
geom_textline(aes(label = Series, color = Series), vjust = -0.8, size = 6,
hjust = "ymax", linewidth = 2, text_smoothing = 30)
Created on 2022-05-04 by the reprex package (v2.0.1)
from geomtextpath.
Thanks for responding. I just tried your working example and I still get:
Warning message:
Ignoring unknown parameters: text_smoothing
Could it be the version of R or or another package?
from geomtextpath.
I don't know of another function called geom_textline
- can you show the output of just typing geom_textline
in the console to ensure it is the correct version? Obviously a restart of Rstudio and a clean workspace are worth a try too.
from geomtextpath.
Here is the output:
> geom_textline
function (mapping = NULL, data = NULL, stat = "identity",
position = "identity", na.rm = FALSE, orientation = NA,
show.legend = NA, inherit.aes = TRUE, ...)
{
layer(data = data, mapping = mapping, stat = stat, geom = GeomTextLine,
position = position, show.legend = show.legend, inherit.aes = inherit.aes,
params = list(na.rm = na.rm, orientation = orientation,
...))
}
<bytecode: 0x00000000159e17c8>
<environment: namespace:geomtextpath>
from geomtextpath.
And running without other packages attached ? (except ggplot2 obviously)
from geomtextpath.
No. But I dropped
library(forcats)
library(ggforce)
library(ggrepel)
library(ggh4x)
library(ggstream)
And it did not produce the error. Perhaps one of these creates some confusion.
from geomtextpath.
Thanks for that. There must be a clash somewhere with one of these packages. I'll investigate and keep you posted.
from geomtextpath.
Judging by the function body, this might be from an older version of geomtextpath. Do you run into the same error with the current version on github? (remotes::install_github("AllanCameron/geomtextpath", quiet = TRUE)
)
from geomtextpath.
I am using the latest from GitHub geomtextpath_0.1.0.9000
from geomtextpath.
In that case I don't understand why the function body you printed contains params = list(na.rm = na.rm
whereas the github version has the following:
geomtextpath/R/geom_textpath.R
Line 311 in f11e256
from geomtextpath.
Related Issues (20)
- Long labels with arrow throw cryptic "Error: Cannot create zero-length unit vector ("unit" subsetting)" error
- Strange behaviour of halign HOT 4
- Feature Request: Set angle for geom_labelvline HOT 6
- Feature request - test for text self-overlap on sharp contours HOT 1
- ggplot coord_polar() issue with multiple classes: 'from' must be a finite number error HOT 1
- session aborted when library in Rstudio HOT 2
- Add compatibility with `ggbump` HOT 2
- geom_textsf randomly throws erros when specification of font family is missing (OpenSUSE Leap 15.5, R 4.3.2) HOT 2
- two labels on same curve HOT 5
- straight argument unknown in geom_textsf() HOT 2
- `label` aesthetic in `geom_textdensity2d` HOT 2
- R 4.3.0 and glyphs 👀 HOT 1
- Can't get things to work HOT 11
- vjust and hjust as aesthetics in geom_textsf HOT 3
- Different behavior for line breaks when there's no data
- geomtextline not accommodating RGBA colors
- show.legend not working in geom_textabline
- Support for `geom_step()`? HOT 2
- Partial match of 'xoff' to 'xoffset'
- geom_textsf seems to ignore remove_long=F
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.