I’ve got two layers of markers for which I’d like to use separate colour mappings. The problem is that the second add_marker inherits the palette from the first one. Is there anything like ggnewscale::new_scale_color() in native plotly? require(plotly) df = data.frame(x = runif(10), y = runif(10), m = runif(10), b = round(runif(10))) plot_ly(data = df, […]

# Tag: “x” = x

I have checked up the official webpage of Plotly, but how to plot the following task still escapes me: id <- c(rep(1,5), rep(2,5), rep(3,5), rep(4,5)) t <- rep(seq(50,75,length.out=5), 4) x <- runif(20) + sin(t) y <- rnorm(20) + cos(t) gender <- c(rep(“F”,10), rep(“M”,10)) smoke <- c(rep(“Y”,5), rep(“N”,10), rep(“Y”,5)) DATA <- data.frame(ID, t, x, y, gender, […]

I am trying to get xaxis tickmode=”array” working for dates for plotly graphs. Here is an example: x <- as.Date(c(“2016-08-12”, “2016-08-13”, “2016-08-14”, “2016-08-15”, “2016-08-16”)) y <- c(1, 2, 3, 4, 5) df <- data.frame(x,y) str(df) plot_ly(df, x = x, y = y) %>% layout(xaxis = list( tickmode = “array”, tickvals = c(as.numeric(as.POSIXct(“2016-08-12″, format=”%Y-%m-%d”))*1000, as.numeric(as.POSIXct(“2016-08-16″, format=”%Y-%m-%d”))*1000), […]

## Real Euclidean space axiom violation

Assume that we have 4 usual axioms for the inner product (denoted as $(x, y)$ for elements $x, y \in V$ and some scalar $c$) in the real Euclidean space $V$: $(x, y) = (y, x)$ $(x, y + z) = (x, y) + (x, z)$ $c(x, y) = (cx, y)$ $(x, x) > 0, […]

Question: $f(X) = (x^3+y)^2+(-x+y-2)^4$, $X = (x,y)$ in $R^2$, my solution: take partial derivatives w.r.t $x$ and $y$ and equate them to zero giving $6x^2(x^3+y)-4(-x+y-2)^3=0$ and $2(x^3+y)+4(-x+y-2)^3=0$ respectively. then adding these gives $(6x^2+2)(x^3+y)=0$ after factorising, so $x^3=-y$, plugging this into the partial $y$ derivative of f gives us that $4(-x-x^3-2)^3=0$ and and so $(x+1)(x^2-x+2)=0$ giving […]

U = {(x + y, x, y): x, y ∈ R} W = {(x, x, 0): x ∈ R Let V = U⊕W, and let {u1, u2, . . . , uk} be a basis for the subspace U and {w1, w2, . . . , wm} be a basis for the subspace W. Prove […]

In a segue I have an UIVIew which have constraints that lays it out to the same size as the screen on the top, left and right as well as to a button on the bottom: Then from the ViewController I programmatically add UIButtons like this: override func viewDidLoad() { super.viewDidLoad() drawCards() } private func […]

I have an error when trying to perform a unit test with Jest on a component in VueJs that has an animation made with TweenMax GSAP. The error is: Cannot tween a null target. in ztButton.spec.js jest.mock(‘gsap/TweenMax’) it(‘Component must to emit event on click’, () => { const wrapper = shallowMount(ztButton) const spy = sinon.spy() […]