Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! ✅Check out the new docs.

Hide contour lines from plot


Is it possible to hide contour lines from contour plot?

I have this:label:

And I am trying to show something like this:

Found it!

needed to add showlines = FALSE in contours = list()


Hello! I followed these directions, but it seems like this functionality is missing from my R package. Has this function been removed? When I try to run I get the following error.

plot_ly(DLL1_embryo_3, z = ~(DLL1_embryo_4), width = 500, height = 500, colors = col2) %>% 
add_contour(showlines = FALSE)

Warning message:
'contour' objects don't have these attributes: 'showlines'
Valid attributes include:
'type', 'visible', 'showlegend', 'legendgroup', 'opacity', 'name', 'uid', 'ids', 'customdata', 'selectedpoints', 
'hoverinfo', 'hoverlabel', 'stream', 'transforms', 'z', 'x', 'x0', 'dx', 'y', 'y0', 'dy', 'text', 'transpose', 'xtype', 
'ytype', 'zhoverformat', 'connectgaps', 'fillcolor', 'autocontour', 'ncontours', 'contours', 'line', 'zauto', 'zmin', 
'zmax', 'colorscale', 'autocolorscale', 'reversescale', 'showscale', 'colorbar', 'xcalendar', 'ycalendar', 'xaxis', 
'yaxis', 'idssrc', 'customdatasrc', 'hoverinfosrc', 'zsrc', 'xsrc', 'ysrc', 'textsrc', 'key', 'set', 'frame', 'transforms', 
'_isNestedKey', '_isSimpleKey', '_isGraticule', '_bbox'

Additionally, uninstalling and reinstalling my plotly package with the latest version


did not solve this problem.

I was working on this a while before I posted, and I have figured out one way to fix this problem. I combined the ploy_ly function directly with the contour arguments…

plot_ly(DLL1_embryo_3, z = ~(DLL1_embryo_4), width = 500, height = 500, colors = col2, type = "contour", contours = list(showlines = FALSE))

Still weird how this fails if you use add_contours() indepedently