chrisadolph/tile-simcf — Issue #1: Specify plot number in trace for line plot, but not scatter plot?
Author: mikefree88
Created: 2012-01-29 09:34:59+00:00
State: open

Given two traces, it seems like you have to specify the plot number for line plots, but not for scatter plots, in order to get two separate graphs. For example, the following code produces two scatter plots for the two traces, but only one line plot for the two traces:

# Libraries
library(foreign)
library(tile)

# Make some data
x = rnorm(10,1)
y = rnorm(10,1)

# Set scatter traces
s.trace.1 <- scatter(x=x, y=y)
s.trace.2 <- scatter(x=x^2, y=y^2)

# Set line traces
l.trace.1 <- lineplot(x=x, y=y)
l.trace.2 <- lineplot(x=x^2, y=y^2)

# Make tile of scatters -- makes two graphs
s.tile <- tile(s.trace.1, s.trace.2)

# Make tile of lineplots -- makes only one graph
l.tile <- tile(l.trace.1, l.trace.2)

This can be solved by specifying different plots for each trace, but it seems odd that this happens. Maybe there is there an error in my code?

Thanks,

Mike