line3D: Lines 3D

Description Usage Arguments See Also Examples

Description

Add 3D lines.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
e_lines_3d(e, source_lon, source_lat, target_lon, target_lat, source_name,
  target_name, value, name = NULL, coord_system = "globe",
  rm_x = TRUE, rm_y = TRUE, ...)

e_line_3d(e, y, z, name = NULL, coord_system = NULL, rm_x = TRUE,
  rm_y = TRUE, ...)

e_lines_3d_(e, source_lon, source_lat, target_lon, target_lat,
  source_name = NULL, target_name = NULL, value = NULL,
  name = NULL, coord_system = "globe", rm_x = TRUE, rm_y = TRUE,
  ...)

e_line_3d_(e, y, z, name = NULL, coord_system = NULL, rm_x = TRUE,
  rm_y = TRUE, ...)

Arguments

e

An echarts4r object as returned by e_charts.

source_lon, source_lat, target_lon, target_lat

coordinates.

source_name, target_name

Names of source and target.

value

Value of edges.

name

name of the serie.

coord_system

Coordinate system to use, such as cartesian3D, or globe.

rm_x, rm_y

Whether to remove x and y axis, defaults to TRUE.

...

Any other option to pass, check See Also section.

y, z

Coordinates of lines.

See Also

Additional arguments for lines 3D, Additional arguments for line 3D

https://echarts4r-assets.john-coene.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# get data
flights <- read.csv(
  paste0("https://raw.githubusercontent.com/plotly/datasets/",
         "master/2011_february_aa_flight_paths.csv")
)

# Lines 3D
# Globe
# get tetures: echarts4r-assets.john-coene.com
flights %>% 
  e_charts() %>% 
  e_globe( 
    displacementScale = 0.05
  ) %>% 
  e_lines_3d(
    start_lon, 
    start_lat, 
    end_lon, 
    end_lat,
    name = "flights",
    effect = list(show = TRUE)
  ) %>% 
  e_legend(FALSE)

# Geo 3D
flights %>% 
  e_charts() %>% 
  e_geo_3d() %>% 
  e_lines_3d(
    start_lon, 
    start_lat, 
    end_lon, 
    end_lat,
    coord_system = "geo3D"
  )
  
# groups
flights$grp <- rep(LETTERS[1:2], 89)

flights %>% 
  group_by(grp) %>% 
  e_charts() %>% 
  e_geo_3d() %>% 
  e_lines_3d(
    start_lon, 
    start_lat, 
    end_lon, 
    end_lat,
    coord_system = "geo3D"
  )
 
# line 3D 
df <- data.frame(
  x = 1:100,
  y = runif(100, 10, 25),
  z = rnorm(100, 100, 50)
)

df %>% 
  e_charts(x) %>% 
  e_line_3d(y, z) %>% 
  e_visual_map() %>% 
  e_title("nonsense")
  
# timeline
df$grp <- rep(LETTERS[1:5], 20)

df %>% 
  group_by(grp) %>% 
  e_charts(x) %>% 
  e_line_3d(y, z) %>% 
  e_visual_map() %>% 
  e_title("nonsense")

JohnCoene/echarts4r documentation built on Sept. 18, 2019, 2:24 a.m.