R make interactive needle plot using plotly package

I want to make an interactive needle plot using R package plotly similar as described here By using ggplot2 and plotly, I could easily make an interactive needle plot: library(ggplot2) library(plotly) p <- ggplot(data.frame(x=1:10, y=1:10), aes(x=x, ymax=y, ymin=0)) + geom_linerange() ggplotly(p) However, when the data size is too big, the above code to generate the… Read More R make interactive needle plot using plotly package

Remove Data from X Axis Labels plotly

Is there a way to remove the x axis data from the x axis? I need the labels, just not the data/volume. (i.e display "Example A", not "Example A 7000") labels = ["Example A","Example B","Example C","Example D","Example E","Example F","Example G","Example H","Example I","Example J","Example K","Example L","Example M","Example N","Example O","Example P","Example Q","Example R","Example S","Example T",] widths =… Read More Remove Data from X Axis Labels plotly

plotly express plot with filled rect in background

How to move below fill rect in background layer? import numpy as np import plotly.express as px def plot(x,y): fig = px.scatter( x=x, y=y, error_y=[0] * len(y), error_y_minus=y ) fig.add_vrect(x0=0, x1=np.pi, line_width=0, fillcolor="pink") tickvals = [0,np.pi/2,np.pi,np.pi*3/2,2*np.pi] ticktext = ["0","$\\frac{\pi}{2}$","$\pi$","$\\frac{3\pi}{4}$","$2\pi$"] layout = dict( title="demo", xaxis_title="X", yaxis_title="Y", title_x=0.5, margin=dict(l=10,t=20,r=0,b=40), height=300, xaxis=dict( tickangle=0, tickvals = tickvals, ticktext=ticktext, ),… Read More plotly express plot with filled rect in background

plotly stacked area graph custom colours from named vector

I am trying to use custom colours with a dataset in Plotly. The named vector works from a line graph and other graphs, but doesn’t for the stacked area graph. Any ideas? Also posted here: https://community.rstudio.com/t/plotly-stacked-area-graph-custom-colours-from-named-vector/153342 library(plotly) library(tidyverse) library(palmerpenguins) # for the dataset penguins_cols <- c("Adelie" = "blue", "Gentoo" = "red", "Chinstrap" = "green") #… Read More plotly stacked area graph custom colours from named vector