# Plotly R

**URL:** https://community.plotly.com/c/plotly-r-matlab-julia-net/r/9.md?page=1

[Latest](https://community.plotly.com/latest.md) · [Categories](https://community.plotly.com/categories.md) · [Tags](https://community.plotly.com/tags.md)

**Page:** 2

---

## [Adding markers from different data frame on Plot\_ly sf plots](https://community.plotly.com/t/adding-markers-from-different-data-frame-on-plot-ly-sf-plots/75332)

<div class="topic-metadata">

**Author:** [@jillahmad17](https://community.plotly.com/u/jillahmad17)\
**Replies:** 2\
**Last updated:** [December 2, 2023, 7:07pm UTC](https://community.plotly.com/t/adding-markers-from-different-data-frame-on-plot-ly-sf-plots/75332 "2023-12-02T19:07:33Z")

</div>

Hi all, I am new here and hope I am not asking something that has been answered before; I looked and looked and could not find the answer to this. I want to add markers from a different dataframe onto a map of North Ca…

---

## [Barpolar: color bar doesn't match data](https://community.plotly.com/t/barpolar-color-bar-doesnt-match-data/80605)

<div class="topic-metadata">

**Author:** [@Matra](https://community.plotly.com/u/Matra)\
**Replies:** 1\
**Last updated:** [December 1, 2023, 7:23pm UTC](https://community.plotly.com/t/barpolar-color-bar-doesnt-match-data/80605 "2023-12-01T19:23:42Z")

</div>

I am attempting to make a barpolar plot with three variables: direction (theta), speed (r), and depth (color). If I map to color at the start with the other two variables, a strange grid appears overlaying the plot, and…

---

## [Specific values in contour lines](https://community.plotly.com/t/specific-values-in-contour-lines/79958)

<div class="topic-metadata">

**Author:** [@Ismael](https://community.plotly.com/u/Ismael)\
**Replies:** 0\
**Last updated:** [November 8, 2023, 5:09pm UTC](https://community.plotly.com/t/specific-values-in-contour-lines/79958 "2023-11-08T17:09:06Z")

</div>

I would have to specify the line value but with a different contour scale, i.e. the lines of this figure: contour plot with 0.1 size But with the scale of this one: contour plot with 0.01 size With the code for…

---

## [Make histogram with plotlyR in a shiny app](https://community.plotly.com/t/make-histogram-with-plotlyr-in-a-shiny-app/79817)

<div class="topic-metadata">

**Author:** [@Saida](https://community.plotly.com/u/Saida)\
**Replies:** 1\
**Last updated:** [November 7, 2023, 11:57am UTC](https://community.plotly.com/t/make-histogram-with-plotlyr-in-a-shiny-app/79817 "2023-11-07T11:57:03Z")

</div>

Hello, I tried to make a plotly in a shiny app but the result is not what I want. Indeed, the graph displays a bar at 100% instead of performing the barplot. The Code : shinyUI(fluidPage( # Application title titlePan…

---

## [Hover text not working with a single element](https://community.plotly.com/t/hover-text-not-working-with-a-single-element/53172)

<div class="topic-metadata">

**Author:** [@parlerbinou](https://community.plotly.com/u/parlerbinou)\
**Replies:** 3\
**Last updated:** [November 1, 2023, 4:38pm UTC](https://community.plotly.com/t/hover-text-not-working-with-a-single-element/53172 "2023-11-01T16:38:37Z")

</div>

I find that the hover text doesn’t work as expected when it has only one element. When there are more than one element provided as the ‘text’ argument of plot\_ly, ‘hovertemplate’ works as intended. However, when the ‘t…

---

## [How to add a contour overlay to a 3D plotly in R?](https://community.plotly.com/t/how-to-add-a-contour-overlay-to-a-3d-plotly-in-r/79104)

<div class="topic-metadata">

**Author:** [@CatN](https://community.plotly.com/u/CatN)\
**Replies:** 4\
**Last updated:** [October 13, 2023, 6:41pm UTC](https://community.plotly.com/t/how-to-add-a-contour-overlay-to-a-3d-plotly-in-r/79104 "2023-10-13T18:41:06Z")

</div>

First time poster here, hopefully i’ve done it right. I am trying to create a 3D plot with grid over the top of the data (similar to this example: How to add a meshgrid to a plotly 3d surface?) but no matter what i try,…

---

## [Resizing shiny-plotly output height and width automatically based on window](https://community.plotly.com/t/resizing-shiny-plotly-output-height-and-width-automatically-based-on-window/4444)

<div class="topic-metadata">

**Author:** [@shinyApp](https://community.plotly.com/u/shinyApp)\
**Replies:** 2\
**Last updated:** [October 6, 2023, 7:00am UTC](https://community.plotly.com/t/resizing-shiny-plotly-output-height-and-width-automatically-based-on-window/4444 "2023-10-06T07:00:37Z")

</div>

I would like to have the shiny-plotly output height and width adjusted to the current window size. I have tried to use the below but of no use. ShinyUi ← fluidPage( Application title titlePanel(“title”), sidebarL…

---

## [Embedded plotly iframe stops working!](https://community.plotly.com/t/embedded-plotly-iframe-stops-working/78706)

<div class="topic-metadata">

**Author:** [@ykalantar](https://community.plotly.com/u/ykalantar)\
**Replies:** 2\
**Last updated:** [September 27, 2023, 3:18pm UTC](https://community.plotly.com/t/embedded-plotly-iframe-stops-working/78706 "2023-09-27T15:18:04Z")

</div>

I have a plotly iframe on my website. The plot was interactively functional. However, it suddenly stopped working, gave a 402 plot twist error, and required me to upgrade my subscription. The reason was that I had 850 vi…

---

## [3D scatter + 3D regression line](https://community.plotly.com/t/3d-scatter-3d-regression-line/4149)

<div class="topic-metadata">

**Author:** [@samuelmehr](https://community.plotly.com/u/samuelmehr)\
**Replies:** 7\
**Last updated:** [August 13, 2023, 1:16am UTC](https://community.plotly.com/t/3d-scatter-3d-regression-line/4149 "2023-08-13T01:16:07Z")

</div>

Hi, I've never needed to plot in 3D before but have an application for it now and am having trouble plotting a regression line with two predictors in 3D using plotly. Is there no way to input a function directly to plo…

---

## [Y Axis - Margin Size](https://community.plotly.com/t/y-axis-margin-size/4404)

<div class="topic-metadata">

**Author:** [@Ricardogs](https://community.plotly.com/u/Ricardogs)\
**Replies:** 4\
**Last updated:** [August 2, 2023, 7:46pm UTC](https://community.plotly.com/t/y-axis-margin-size/4404 "2023-08-02T19:46:15Z")

</div>

Hi, How can I change the Y axis margin's size in order to fit the size of the words that appear in the axis? \[image\] The code is: p \<- plot\_ly() p \<- add\_trace(p, wordfreq, x =wordfreq\[,2\] , y = wordfreq\[,1\], …

---

## [How do I stop the axis from changing in a 3D animated plot?](https://community.plotly.com/t/how-do-i-stop-the-axis-from-changing-in-a-3d-animated-plot/76773)

<div class="topic-metadata">

**Author:** [@tristan1](https://community.plotly.com/u/tristan1)\
**Replies:** 1\
**Last updated:** [July 22, 2023, 12:30am UTC](https://community.plotly.com/t/how-do-i-stop-the-axis-from-changing-in-a-3d-animated-plot/76773 "2023-07-22T00:30:38Z")

</div>

Hey, So I’m trying to animate a 3D scatter plot over a time period. The problem is that the dot never moves, the axes scale up and down. Any Idea how to fix this? My code: plot\_ly(df, x = ~x, y = ~y, z = ~z, type = 's…

---

## [Why does setting the color limits in julia not change my heatmap?](https://community.plotly.com/t/why-does-setting-the-color-limits-in-julia-not-change-my-heatmap/76699)

<div class="topic-metadata">

**Author:** [@rikkie567](https://community.plotly.com/u/rikkie567)\
**Replies:** 0\
**Last updated:** [July 6, 2023, 10:50am UTC](https://community.plotly.com/t/why-does-setting-the-color-limits-in-julia-not-change-my-heatmap/76699 "2023-07-06T10:50:59Z")

</div>

Hi, I cannot manage to change the color limits of my plotly heatmap in julia. I have tried the following options, but none seem to work: using PlotlyJS function makePlot1() n = 40 m = 50 data = rand(n, m) displa…

---

## [How to set the color of Individual Bars of a Waterfall Chart?](https://community.plotly.com/t/how-to-set-the-color-of-individual-bars-of-a-waterfall-chart/31477)

<div class="topic-metadata">

**Author:** [@abhivr](https://community.plotly.com/u/abhivr)\
**Replies:** 3\
**Last updated:** [June 19, 2023, 7:35am UTC](https://community.plotly.com/t/how-to-set-the-color-of-individual-bars-of-a-waterfall-chart/31477 "2023-06-19T07:35:53Z")

</div>

Hi I am trying to change the color of the individual bars of a waterfall chart, more specifically the first and the last bar, I want it to be blue and yellow respectively. So in the below graph, Group 1 has to be blue a…

---

## [Add Lines to plot\_ly 3D NMDS Ordination](https://community.plotly.com/t/add-lines-to-plot-ly-3d-nmds-ordination/75366)

<div class="topic-metadata">

**Author:** [@AdrianEcology](https://community.plotly.com/u/AdrianEcology)\
**Replies:** 0\
**Last updated:** [May 17, 2023, 8:47pm UTC](https://community.plotly.com/t/add-lines-to-plot-ly-3d-nmds-ordination/75366 "2023-05-17T20:47:45Z")

</div>

Hi, I would like to add lines of 5 categories that are driving seasonal shifts in the dietary composition of my study species, using the plot\_ly package in R. I successfully made the 3D ordination but when I tried using…

---

## [COLORFUL SCATTER PLOT](https://community.plotly.com/t/colorful-scatter-plot/75174)

<div class="topic-metadata">

**Author:** [@Catarina\_01](https://community.plotly.com/u/Catarina_01)\
**Replies:** 0\
**Last updated:** [May 11, 2023, 8:58am UTC](https://community.plotly.com/t/colorful-scatter-plot/75174 "2023-05-11T08:58:10Z")

</div>

Hello! I am trying to construct a scatter plot, where each point is colored according to the HEX codes indicated in the table. I am using this code to build the colored scatterplot. However, the colors that appea…

---

## [Remove "Edit Chart" from embedded HTML graph made in R](https://community.plotly.com/t/remove-edit-chart-from-embedded-html-graph-made-in-r/1601)

<div class="topic-metadata">

**Author:** [@jsukup](https://community.plotly.com/u/jsukup)\
**Replies:** 5\
**Last updated:** [May 18, 2018, 8:49am UTC](https://community.plotly.com/t/remove-edit-chart-from-embedded-html-graph-made-in-r/1601 "2018-05-18T08:49:16Z")

</div>

I feel like the answer to this question should be on this site somewhere, but it only seems to relate to Plotly charts made in iframes or another coding. Anyway, I have created a Plotly chart in R Studio and uploaded it …

---

## [Add custom annotations to heatmap in plotly](https://community.plotly.com/t/add-custom-annotations-to-heatmap-in-plotly/74270)

<div class="topic-metadata">

**Author:** [@deeyasen](https://community.plotly.com/u/deeyasen)\
**Replies:** 1\
**Last updated:** [April 26, 2023, 10:00am UTC](https://community.plotly.com/t/add-custom-annotations-to-heatmap-in-plotly/74270 "2023-04-26T10:00:46Z")

</div>

Hello all, I am trying to add annotations to a heatmap by using the add\_annotations function in plotly R but am unable to control placement of text in the heatmap. For instance, in the plot below, I am tryng to annotate…

---

## [Simultaneous rotation of 3D subplots](https://community.plotly.com/t/simultaneous-rotation-of-3d-subplots/74039)

<div class="topic-metadata">

**Author:** [@Carbu97](https://community.plotly.com/u/Carbu97)\
**Replies:** 0\
**Last updated:** [April 1, 2023, 7:19am UTC](https://community.plotly.com/t/simultaneous-rotation-of-3d-subplots/74039 "2023-04-01T07:19:13Z")

</div>

Hi guys, I have to display 3D subplots but I’m facing a problem: I’m not be able to make them rotate simultaneously when I rotate one of them. Is it possible to achieve this result in R? Thanks in advance.

---

## [Legend getting cut off when put inside iframe on website with tabs](https://community.plotly.com/t/legend-getting-cut-off-when-put-inside-iframe-on-website-with-tabs/73846)

<div class="topic-metadata">

**Author:** [@trentpicc](https://community.plotly.com/u/trentpicc)\
**Replies:** 0\
**Last updated:** [March 24, 2023, 8:02am UTC](https://community.plotly.com/t/legend-getting-cut-off-when-put-inside-iframe-on-website-with-tabs/73846 "2023-03-24T08:02:20Z")

</div>

So I have a website in HTML that I didn’t make but am editing it to add plot\_ly plots. I don’t know much about HTML or CSS however am learning more. The website has tabs, I added plot\_ly plots as iframes to the front ta…

---

## [Send plotly::highlight() selections to Shiny server and restyle distinct line traces generated from data |\> group\_by()](https://community.plotly.com/t/send-plotly-highlight-selections-to-shiny-server-and-restyle-distinct-line-traces-generated-from-data-group-by/73677)

<div class="topic-metadata">

**Author:** [@philemoncyclone](https://community.plotly.com/u/philemoncyclone)\
**Replies:** 1\
**Last updated:** [March 22, 2023, 3:29pm UTC](https://community.plotly.com/t/send-plotly-highlight-selections-to-shiny-server-and-restyle-distinct-line-traces-generated-from-data-group-by/73677 "2023-03-22T15:29:39Z")

</div>

I’m trying to emulate the behavior of plotly::highlight() in a Shiny app, but on the server side, for line traces generated from long-format data, where the data frame has columns x, y, CurveID, where each CurveID is a s…

---

## [Plotly Sunburst returning empty chart with branchvalues = 'total'](https://community.plotly.com/t/plotly-sunburst-returning-empty-chart-with-branchvalues-total/26582)

<div class="topic-metadata">

**Author:** [@NewToR](https://community.plotly.com/u/NewToR)\
**Replies:** 25\
**Last updated:** [March 15, 2023, 10:55am UTC](https://community.plotly.com/t/plotly-sunburst-returning-empty-chart-with-branchvalues-total/26582 "2023-03-15T10:55:52Z")

</div>

Hi all! I am having problems with the “plotly” package in R, in particular with the “sunburst” type of graph. When I specify branchvalues = “remainder” the result is as expected (but not what I want), whereas when I sp…

---

## [Multiple transforms filter for buttons and slider in Plotly R](https://community.plotly.com/t/multiple-transforms-filter-for-buttons-and-slider-in-plotly-r/72872)

<div class="topic-metadata">

**Author:** [@cltsson](https://community.plotly.com/u/cltsson)\
**Replies:** 0\
**Last updated:** [February 20, 2023, 12:30pm UTC](https://community.plotly.com/t/multiple-transforms-filter-for-buttons-and-slider-in-plotly-r/72872 "2023-02-20T12:30:53Z")

</div>

Hi there, I have \[X, Y, Z\] data for 7 different test sessions (Level variable). Each session has 24 trials (Trial\_Number variable). I want to create 3D plots of the XYZ data where a dropdown menu allows the user to sele…

---

## [Warnings when adding line segments to candlestick plot](https://community.plotly.com/t/warnings-when-adding-line-segments-to-candlestick-plot/72829)

<div class="topic-metadata">

**Author:** [@jamesmatheson](https://community.plotly.com/u/jamesmatheson)\
**Replies:** 0\
**Last updated:** [February 18, 2023, 5:24pm UTC](https://community.plotly.com/t/warnings-when-adding-line-segments-to-candlestick-plot/72829 "2023-02-18T17:24:17Z")

</div>

Hi - When adding line segments to a candlestick plot using add\_segments I get this warning: “Warning: ‘scatter’ objects don’t have these attributes: ‘open’, ‘close’, ‘layer’, ‘high’, ‘low’” I have a lot of line segme…

---

## [Ploty images saved on external file](https://community.plotly.com/t/ploty-images-saved-on-external-file/72642)

<div class="topic-metadata">

**Author:** [@ms1948](https://community.plotly.com/u/ms1948)\
**Replies:** 0\
**Last updated:** [February 13, 2023, 12:50pm UTC](https://community.plotly.com/t/ploty-images-saved-on-external-file/72642 "2023-02-13T12:50:47Z")

</div>

Two Questions: Why if gauge plot inserted in a loop \[for (I in 1:8) \] does not produce the graph ? How to save the gauge image on an external file type .png or .jpg

---

## [502 errors on trying to save images](https://community.plotly.com/t/502-errors-on-trying-to-save-images/5782)

<div class="topic-metadata">

**Author:** [@significance](https://community.plotly.com/u/significance)\
**Replies:** 2\
**Last updated:** [January 13, 2023, 5:37am UTC](https://community.plotly.com/t/502-errors-on-trying-to-save-images/5782 "2023-01-13T05:37:23Z")

</div>

I keep getting the following error when I try to save an image (using plotly\_IMAGE in R): \<html\>\<head\> \<meta http-equiv="content-type" content="text/html;charset=utf-8"\> \<title\>502 Server Error\</title\> \</head\> \<body te…

---

## [Can't switch on/off traces from plotly plot when editable=TRUE](https://community.plotly.com/t/cant-switch-on-off-traces-from-plotly-plot-when-editable-true/70804)

<div class="topic-metadata">

**Author:** [@tvetter1976](https://community.plotly.com/u/tvetter1976)\
**Replies:** 1\
**Last updated:** [December 14, 2022, 11:32am UTC](https://community.plotly.com/t/cant-switch-on-off-traces-from-plotly-plot-when-editable-true/70804 "2022-12-14T11:32:13Z")

</div>

I have a plot, where I like to shift a vertical line. So far I achieved this by adding shapes to a plotly plot and using plotly::config(editable = TRUE). But when I enable editable = TRUE i am not able to switch on/off…

---

## [Update mapbox colorscale in Shiny](https://community.plotly.com/t/update-mapbox-colorscale-in-shiny/70546)

<div class="topic-metadata">

**Author:** [@pepcmarques](https://community.plotly.com/u/pepcmarques)\
**Replies:** 0\
**Last updated:** [December 5, 2022, 5:25pm UTC](https://community.plotly.com/t/update-mapbox-colorscale-in-shiny/70546 "2022-12-05T17:25:26Z")

</div>

Hello, I would like to update the mailbox choropleth colorscale based on a dropdown menu selection. I found this which was developed in Python, but I would like to do the same for R/Shiny. This was what I tried: glob…

---

## [Multiple x-axes with different ticks R](https://community.plotly.com/t/multiple-x-axes-with-different-ticks-r/70019)

<div class="topic-metadata">

**Author:** [@Npennell](https://community.plotly.com/u/Npennell)\
**Replies:** 0\
**Last updated:** [November 17, 2022, 11:56pm UTC](https://community.plotly.com/t/multiple-x-axes-with-different-ticks-r/70019 "2022-11-17T23:56:00Z")

</div>

I’m trying to recreate a plot with multiple axis with different ticks as seen in a different users post (Multiple x-axes with different ticks depending on zoom level) , but in R. The two plots by MaartenB are what am tr…

---

## [Removing or restyling specific points in a trace (not an entire trace)](https://community.plotly.com/t/removing-or-restyling-specific-points-in-a-trace-not-an-entire-trace/7884)

<div class="topic-metadata">

**Author:** [@daattali](https://community.plotly.com/u/daattali)\
**Replies:** 6\
**Last updated:** [November 17, 2022, 11:51am UTC](https://community.plotly.com/t/removing-or-restyling-specific-points-in-a-trace-not-an-entire-trace/7884 "2022-11-17T11:51:30Z")

</div>

I want to be able to remove a few points from a trace, or alternatively modify their style to set their opacity to 0. I’m not sure if the former is even technically possible, but I think the latter should be possible. I…

---

## [Empty space before first date and after last date with plotly and filter\_slider in R](https://community.plotly.com/t/empty-space-before-first-date-and-after-last-date-with-plotly-and-filter-slider-in-r/69290)

<div class="topic-metadata">

**Author:** [@miguelcasi](https://community.plotly.com/u/miguelcasi)\
**Replies:** 0\
**Last updated:** [October 27, 2022, 1:40pm UTC](https://community.plotly.com/t/empty-space-before-first-date-and-after-last-date-with-plotly-and-filter-slider-in-r/69290 "2022-10-27T13:40:53Z")

</div>

Here is my code: both\_df\_sh \<- dataset %\>% SharedData$new(group = "boom") selector \<- filter\_slider(id = "selector1", label = "Date Range", sharedData = both\_df\_sh, column = ~date) v\_p \<- both\_df\_sh %\>% plot\_ly(x = ~…

[Previous page](https://community.plotly.com/c/plotly-r-matlab-julia-net/r/9.md)

[Next page](https://community.plotly.com/c/plotly-r-matlab-julia-net/r/9.md?page=2)
