# Plotly for MATLAB®

**URL:** https://community.plotly.com/c/plotly-r-matlab-julia-net/matlab/22.md

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

---

## [About the matlab category](https://community.plotly.com/t/about-the-matlab-category/55133)

<div class="topic-metadata">

**Author:** [@jack](https://community.plotly.com/u/jack)\
**Replies:** 0

</div>

QA & discourse on the Plotly MATLAB® library

---

## [Issues with fig2plotly() from a multplot in MATLAB](https://community.plotly.com/t/issues-with-fig2plotly-from-a-multplot-in-matlab/85846)

<div class="topic-metadata">

**Author:** [@japifilho](https://community.plotly.com/u/japifilho)\
**Replies:** 1\
**Last updated:** [August 13, 2026, 4:35pm UTC](https://community.plotly.com/t/issues-with-fig2plotly-from-a-multplot-in-matlab/85846 "2026-08-13T16:35:51Z")

</div>

I am trying to convert a figure that contains two subplots using fig2plotly. The two subplots are function plots, each with a contour map obtained using contourf() as a background to represent values of the functions in …

---

## [Plotly 3D Cone Plot does not scale the colorbar with the magnitude (norm) of the cones (vectors)](https://community.plotly.com/t/plotly-3d-cone-plot-does-not-scale-the-colorbar-with-the-magnitude-norm-of-the-cones-vectors/93278)

<div class="topic-metadata">

**Author:** [@longistamina](https://community.plotly.com/u/longistamina)\
**Replies:** 3\
**Last updated:** [July 22, 2025, 8:48am UTC](https://community.plotly.com/t/plotly-3d-cone-plot-does-not-scale-the-colorbar-with-the-magnitude-norm-of-the-cones-vectors/93278 "2025-07-22T08:48:04Z")

</div>

Hello, is anyone here familiar with Plotly (R or Python). I am trying to use R plotly to visualize 3D cones (vectors). Below are my codes library(plotly) library(tidyverse) ## Data preparation ## rotate\_x \<- functio…

---

## [Error in readContentFromWebService()](https://community.plotly.com/t/error-in-readcontentfromwebservice/86828)

<div class="topic-metadata">

**Author:** [@cka](https://community.plotly.com/u/cka)\
**Replies:** 2\
**Last updated:** [September 6, 2024, 8:11am UTC](https://community.plotly.com/t/error-in-readcontentfromwebservice/86828 "2024-09-06T08:11:53Z")

</div>

Hi everyone. I am trying to update some of my online graphs using the latest version of the MATLAB Plotly toolbox (v3.0.0), but I have been getting the following error: Error using matlab.internal.webservices.HTTPConnec…

---

## [Plotly R Highlight() - Issue with highlighting bars in grouped/stacked bar chart](https://community.plotly.com/t/plotly-r-highlight-issue-with-highlighting-bars-in-grouped-stacked-bar-chart/85893)

<div class="topic-metadata">

**Author:** [@DeepT](https://community.plotly.com/u/DeepT)\
**Replies:** 0\
**Last updated:** [July 17, 2024, 12:32pm UTC](https://community.plotly.com/t/plotly-r-highlight-issue-with-highlighting-bars-in-grouped-stacked-bar-chart/85893 "2024-07-17T12:32:58Z")

</div>

Hi, I’ve encountered a strange issue with the highlight() function with Plotly grouped/stacked bar chart. When I try to highlight a specific bar, it gets split into two, and only half of the bar gets highlighted. Does a…

---

## [Yline not showing in the HTML file](https://community.plotly.com/t/yline-not-showing-in-the-html-file/85873)

<div class="topic-metadata">

**Author:** [@jerome135](https://community.plotly.com/u/jerome135)\
**Replies:** 0\
**Last updated:** [July 16, 2024, 4:36pm UTC](https://community.plotly.com/t/yline-not-showing-in-the-html-file/85873 "2024-07-16T16:36:26Z")

</div>

When using yline on plots, it shows well on the MATLAB plot, but not on the exported html file. I tried as well to increase the line width or to add text, but it never shows up in the HTML file. Is this a bug? Am I mis…

---

## [Issue: 3D Scatter is placed inside 2D axes MATLAB](https://community.plotly.com/t/issue-3d-scatter-is-placed-inside-2d-axes-matlab/80968)

<div class="topic-metadata">

**Author:** [@steg](https://community.plotly.com/u/steg)\
**Replies:** 1\
**Last updated:** [March 13, 2024, 9:04pm UTC](https://community.plotly.com/t/issue-3d-scatter-is-placed-inside-2d-axes-matlab/80968 "2024-03-13T21:04:56Z")

</div>

I am having a strange issue on plotly offline for MATLAB. A 3D scatterplot will sometimes plot within a 2D axis, even though I have just plotted a basic scatter3 figure. I can input different data and the scatterplot wil…

---

## [Getting Started Guide. PART II: Installation](https://community.plotly.com/t/getting-started-guide-part-ii-installation/56619)

<div class="topic-metadata">

**Author:** [@gilbertogalvis](https://community.plotly.com/u/gilbertogalvis)\
**Replies:** 1\
**Last updated:** [September 13, 2023, 3:32pm UTC](https://community.plotly.com/t/getting-started-guide-part-ii-installation/56619 "2023-09-13T15:32:59Z")

</div>

Installing Plotly Graphing Library for MATLAB® … Once the library is downloaded, we proceed to open our MATLAB. Then, in the MATLAB command window please go to the library folder resulting from the download. In my case i…

---

## [Mouse wheel zoom for plotly matlab](https://community.plotly.com/t/mouse-wheel-zoom-for-plotly-matlab/77726)

<div class="topic-metadata">

**Author:** [@jcox](https://community.plotly.com/u/jcox)\
**Replies:** 0\
**Last updated:** [August 14, 2023, 7:11pm UTC](https://community.plotly.com/t/mouse-wheel-zoom-for-plotly-matlab/77726 "2023-08-14T19:11:52Z")

</div>

Hi, I’ve come across the mouse wheel zoom functionality for java and python plotly (ie: config = dict({‘scrollZoom’: True}), is there a similar method for matlab? Just using plotly to display basic matlab scatter plots…

---

## [Getting Matlab timeseries dates to display correctly](https://community.plotly.com/t/getting-matlab-timeseries-dates-to-display-correctly/74370)

<div class="topic-metadata">

**Author:** [@brycycle](https://community.plotly.com/u/brycycle)\
**Replies:** 0\
**Last updated:** [April 12, 2023, 5:22pm UTC](https://community.plotly.com/t/getting-matlab-timeseries-dates-to-display-correctly/74370 "2023-04-12T17:22:48Z")

</div>

I ran into an issue where fig2plotly was showing datenum values in the plot rather than the actual dates. Here is my fix. x = datetime(2023,01,01):caldays(1):datetime(2023,02,01); y = rand(size(x)); h = plot(x,y); ax…

---

## [Getplotlyfig() Error](https://community.plotly.com/t/getplotlyfig-error/69861)

<div class="topic-metadata">

**Author:** [@cka](https://community.plotly.com/u/cka)\
**Replies:** 1\
**Last updated:** [November 20, 2022, 5:00pm UTC](https://community.plotly.com/t/getplotlyfig-error/69861 "2022-11-20T17:00:46Z")

</div>

Hi. I am using the latest Plotly release (2.2.5) for MATLAB. I am trying to retrieve a figure from my account, using getplotlyfig('userXYZ','80'). I am passing the number of the figure as a string (as shown in the user g…

---

## [How to darken or fade color values for negative and positive values with green and red in TreeMap plotly python?](https://community.plotly.com/t/how-to-darken-or-fade-color-values-for-negative-and-positive-values-with-green-and-red-in-treemap-plotly-python/68598)

<div class="topic-metadata">

**Author:** [@StevenDO](https://community.plotly.com/u/StevenDO)\
**Replies:** 0\
**Last updated:** [October 4, 2022, 8:36pm UTC](https://community.plotly.com/t/how-to-darken-or-fade-color-values-for-negative-and-positive-values-with-green-and-red-in-treemap-plotly-python/68598 "2022-10-04T20:36:26Z")

</div>

I want customcolor for color value to darken for large percentages and fade to small percentage in green and red scale As far as I know is to use color\_continous\_scale in the treemap but I tried and don’t know what to r…

---

## [Plotly plots in MATLAB App designer](https://community.plotly.com/t/plotly-plots-in-matlab-app-designer/61715)

<div class="topic-metadata">

**Author:** [@adi92](https://community.plotly.com/u/adi92)\
**Replies:** 0\
**Last updated:** [March 8, 2022, 12:12am UTC](https://community.plotly.com/t/plotly-plots-in-matlab-app-designer/61715 "2022-03-08T00:12:41Z")

</div>

Hi, I am looking to use plotly with matlab and find a good number of examples. Most of these display the plots in the web borwser. I have a matlab app built out of the app designer. Is there a way to make plotly display…

---

## [Plotly removes the MatLab plot data tips, is there a way to fix?](https://community.plotly.com/t/plotly-removes-the-matlab-plot-data-tips-is-there-a-way-to-fix/61206)

<div class="topic-metadata">

**Author:** [@jharry93](https://community.plotly.com/u/jharry93)\
**Replies:** 0\
**Last updated:** [February 18, 2022, 6:43pm UTC](https://community.plotly.com/t/plotly-removes-the-matlab-plot-data-tips-is-there-a-way-to-fix/61206 "2022-02-18T18:43:16Z")

</div>

I’ve configured my MATLAB plots to show certain pieces of information about data when my cursor hovers over the plotted data (i.e. I wanted more than just the x and y axis value of the data). In MATLAB, this is accomplis…

---

## [MATLAB's Geographic Plots with Plotly!](https://community.plotly.com/t/matlabs-geographic-plots-with-plotly/57091)

<div class="topic-metadata">

**Author:** [@gilbertogalvis](https://community.plotly.com/u/gilbertogalvis)\
**Replies:** 1\
**Last updated:** [February 11, 2022, 5:19am UTC](https://community.plotly.com/t/matlabs-geographic-plots-with-plotly/57091 "2022-02-11T05:19:22Z")

</div>

With MATLAB we can visualize latitude and longitude data over interactive maps using Geographic Plots. For this, MATLAB provides us with three functions: geoscatter, geoplot, and geobubble. Using the geoscatter functio…

---

## [Axis Labels on 3D Plots](https://community.plotly.com/t/axis-labels-on-3d-plots/57787)

<div class="topic-metadata">

**Author:** [@Tarius](https://community.plotly.com/u/Tarius)\
**Replies:** 1\
**Last updated:** [January 17, 2022, 11:37pm UTC](https://community.plotly.com/t/axis-labels-on-3d-plots/57787 "2022-01-17T23:37:36Z")

</div>

Super great functionality! I recently spent a frusteratingly long time attempting to create an interactive PDF or xhtml with some success - but the plotly is far and away the most beautiful. I have studied up on some of…

---

## [Matlab Offline Multiple Plots in HTML](https://community.plotly.com/t/matlab-offline-multiple-plots-in-html/57676)

<div class="topic-metadata">

**Author:** [@wcmiller3](https://community.plotly.com/u/wcmiller3)\
**Replies:** 2\
**Last updated:** [October 22, 2021, 2:24pm UTC](https://community.plotly.com/t/matlab-offline-multiple-plots-in-html/57676 "2021-10-22T14:24:45Z")

</div>

Looking for a way to publish multiple matlab plots into a single HTML file via plotly offline for matlab? Any thoughts here?

---

## [How to convert Matlab figure with uicontrol (buttons, slider etc) to plotly](https://community.plotly.com/t/how-to-convert-matlab-figure-with-uicontrol-buttons-slider-etc-to-plotly/57809)

<div class="topic-metadata">

**Author:** [@sweetcoffee](https://community.plotly.com/u/sweetcoffee)\
**Replies:** 0\
**Last updated:** [October 22, 2021, 4:50am UTC](https://community.plotly.com/t/how-to-convert-matlab-figure-with-uicontrol-buttons-slider-etc-to-plotly/57809 "2021-10-22T04:50:13Z")

</div>

I am using uicontrol or livescript to create matlab figures with buttons and sliders. When i convert them using fig2plotly(), the buttons and sliders disappeared. Does plotly not support them or do i need to turn on cert…

---

## [Handling MATLAB subplot functionality](https://community.plotly.com/t/handling-matlab-subplot-functionality/57627)

<div class="topic-metadata">

**Author:** [@gilbertogalvis](https://community.plotly.com/u/gilbertogalvis)\
**Replies:** 0\
**Last updated:** [October 16, 2021, 2:13pm UTC](https://community.plotly.com/t/handling-matlab-subplot-functionality/57627 "2021-10-16T14:13:45Z")

</div>

MATLAB’s subplot(m,n,p) functionality divides the current figure into an m-by-n grid and creates axes in the position specified by p . MATLAB® numbers subplot positions by row. The first subplot is the first column of th…

---

## [Amazing addtheme functionality!](https://community.plotly.com/t/amazing-addtheme-functionality/57621)

<div class="topic-metadata">

**Author:** [@gilbertogalvis](https://community.plotly.com/u/gilbertogalvis)\
**Replies:** 0\
**Last updated:** [October 16, 2021, 1:24am UTC](https://community.plotly.com/t/amazing-addtheme-functionality/57621 "2021-10-16T01:24:46Z")

</div>

The Plotly Graphing Library for MATLAB comes pre-loaded with several themes that you can get started using right away, and it also provides support for creating and registering your own themes. Available Themes To be mo…

---

## [MATLAB Animations to Plotly - Part II](https://community.plotly.com/t/matlab-animations-to-plotly-part-ii/57139)

<div class="topic-metadata">

**Author:** [@purwar](https://community.plotly.com/u/purwar)\
**Replies:** 0\
**Last updated:** [September 30, 2021, 10:32am UTC](https://community.plotly.com/t/matlab-animations-to-plotly-part-ii/57139 "2021-09-30T10:32:42Z")

</div>

Comet3 is also supported just like comets and animated lines. Sample MATLAB Code (generates a comet in 3d using comet3): \[xmat,ymat,zmat\] = peaks(50); xvec = xmat(:); yvec = ymat(:); zvec = zmat(:); p = 0.05; comet3(x…

---

## [MATLAB Animations to Plotly](https://community.plotly.com/t/matlab-animations-to-plotly/57038)

<div class="topic-metadata">

**Author:** [@purwar](https://community.plotly.com/u/purwar)\
**Replies:** 0\
**Last updated:** [September 27, 2021, 11:58am UTC](https://community.plotly.com/t/matlab-animations-to-plotly/57038 "2021-09-27T11:58:12Z")

</div>

The animations introduced in the recent versions on MATLAB with Animated Line and Comet/Comet3 can now easily be ported to Plotly. This is currently only supported in the Offline mode. Using Plotly with MATLAB in offline…

---

## [MATLAB's meshc charts in Plotly!](https://community.plotly.com/t/matlabs-meshc-charts-in-plotly/56761)

<div class="topic-metadata">

**Author:** [@gilbertogalvis](https://community.plotly.com/u/gilbertogalvis)\
**Replies:** 0\
**Last updated:** [September 19, 2021, 11:31pm UTC](https://community.plotly.com/t/matlabs-meshc-charts-in-plotly/56761 "2021-09-19T23:31:16Z")

</div>

Using the MATLAB function meshc(X,Y,Z), we can also create a 3-D mesh surface plot with a contour plot underneath. So with this functionality MATLAB offers us the ability to create surprisingly interesting charts. With t…

---

## [Drawing contour plot under surface using MATLAB's surfc function and Plotly!](https://community.plotly.com/t/drawing-contour-plot-under-surface-using-matlabs-surfc-function-and-plotly/56750)

<div class="topic-metadata">

**Author:** [@gilbertogalvis](https://community.plotly.com/u/gilbertogalvis)\
**Replies:** 0\
**Last updated:** [September 19, 2021, 12:26am UTC](https://community.plotly.com/t/drawing-contour-plot-under-surface-using-matlabs-surfc-function-and-plotly/56750 "2021-09-19T00:26:22Z")

</div>

With MATLAB we can create a 3-D surface plot with a contour plot underneath. For this MATLAB has reserved the function surfc(X,Y,Z). The figure generated by MATLAB is really captivating. In this post we will see what the…

---

## [Horizontal 3-D bar graphs with MATLAB and fig2plotly](https://community.plotly.com/t/horizontal-3-d-bar-graphs-with-matlab-and-fig2plotly/56749)

<div class="topic-metadata">

**Author:** [@gilbertogalvis](https://community.plotly.com/u/gilbertogalvis)\
**Replies:** 0\
**Last updated:** [September 18, 2021, 11:02pm UTC](https://community.plotly.com/t/horizontal-3-d-bar-graphs-with-matlab-and-fig2plotly/56749 "2021-09-18T23:02:54Z")

</div>

In the previous post we saw how fig2plotly created beautiful 3D bar charts, based on the MATLAB function bar3. This time we will experience interesting horizontal 3-D bar graphs using MATLAB’s bar3h function. bar3h draw…

---

## [Drawing MATLAB's bar3 graphs with Plotly!](https://community.plotly.com/t/drawing-matlabs-bar3-graphs-with-plotly/56742)

<div class="topic-metadata">

**Author:** [@gilbertogalvis](https://community.plotly.com/u/gilbertogalvis)\
**Replies:** 0\
**Last updated:** [September 18, 2021, 5:25pm UTC](https://community.plotly.com/t/drawing-matlabs-bar3-graphs-with-plotly/56742 "2021-09-18T17:25:01Z")

</div>

The MATLAB function bar3 draws interesting 3D bar graphs. The visual aspect that MATLAB offers us with this type of chart is friendly and intuitive. However, they are definitely worth recreating with fig2plotly :boom: T…

---

## [Fig2plotly available for MATLAB's fmesh functionality](https://community.plotly.com/t/fig2plotly-available-for-matlabs-fmesh-functionality/56735)

<div class="topic-metadata">

**Author:** [@gilbertogalvis](https://community.plotly.com/u/gilbertogalvis)\
**Replies:** 0\
**Last updated:** [September 18, 2021, 1:08pm UTC](https://community.plotly.com/t/fig2plotly-available-for-matlabs-fmesh-functionality/56735 "2021-09-18T13:08:55Z")

</div>

MATLAB can also plot 3-D mesh by simply typing a mathematical expression, z = f(x,y). We can access this through MATLAB’s fmesh function. Now, depending on the mathematical expression we pass as the input argument in fm…

---

## [We can access MATLAB's powerful fsurf charts using fig2plotly!](https://community.plotly.com/t/we-can-access-matlabs-powerful-fsurf-charts-using-fig2plotly/56734)

<div class="topic-metadata">

**Author:** [@gilbertogalvis](https://community.plotly.com/u/gilbertogalvis)\
**Replies:** 0\
**Last updated:** [September 18, 2021, 12:34pm UTC](https://community.plotly.com/t/we-can-access-matlabs-powerful-fsurf-charts-using-fig2plotly/56734 "2021-09-18T12:34:54Z")

</div>

Using MATLAB we can incredibly plot 3-D surfaces just by entering a mathematical expression given by z = f(x, y). We can do this using the MATLAB function fsurf. Now, depending on the mathematical expression that we pa…

---

## [Getting Started Guide. PART I: Download](https://community.plotly.com/t/getting-started-guide-part-i-download/56617)

<div class="topic-metadata">

**Author:** [@gilbertogalvis](https://community.plotly.com/u/gilbertogalvis)\
**Replies:** 0\
**Last updated:** [September 14, 2021, 5:19pm UTC](https://community.plotly.com/t/getting-started-guide-part-i-download/56617 "2021-09-14T17:19:45Z")

</div>

In the previous topic we had a briefing on this amazing Plotly Graphing Library for MATLAB®. We were able to see awesome Plotly Charts that we can create based on the charts generated by MATLAB. We experience the supreme…

---

## [Fig2plotly can also generate MATLAB-based mesh surface Charts!](https://community.plotly.com/t/fig2plotly-can-also-generate-matlab-based-mesh-surface-charts/56691)

<div class="topic-metadata">

**Author:** [@gilbertogalvis](https://community.plotly.com/u/gilbertogalvis)\
**Replies:** 0\
**Last updated:** [September 16, 2021, 8:19pm UTC](https://community.plotly.com/t/fig2plotly-can-also-generate-matlab-based-mesh-surface-charts/56691 "2021-09-16T20:19:48Z")

</div>

MATLAB’s mesh function allows us to plot impressive 3D mesh surfaces. However, as we have seen in previous posts, fig2plotly can significantly boost those Charts using the elegance of Plotly. To address MATLAB’s mesh fu…

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