Horizontal 3-D bar graphs with MATLAB and fig2plotly

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 draws interesting 3D horizontal bar charts . The visual aspect that MATLAB offers us with this type of chart is friendly and intuitive. But, fig2plotly will surely amaze us with its equivalent version, don’t you think this? :smirk:

For this, fig2plotly needs the optional parameter 'TreatAs' to be set to 'bar3h' to work with MATLAB’s bar3h function. Let’s exemplify this below

load count.dat;
Y = count(1:10,:);
width = 0.5;

figure
bar3h(Y,width)
title('Width of 0.5');

fig2plotly(gcf, 'offline', false, 'TreatAs', 'bar3h');

If we execute the previous MATLAB code, the results we would obtain would be the following

As we can see in the previous screenshot, the horizontal bar graph generated by MATLAB would be the one on the left, which has an interesting visual appearance. But, the Plotly Chart-Studio chart (on the right) is a significantly improved version! :laughing: :star_struck:

By following this link you can experiment on your own directly in Plotly Chart-Studio. I am inviting you to what you are doing! :raised_hands:

In this repository folder you can find more examples using MATLAB’s bar3h functionality. Please feel free to recreate those examples with fig2plotly using what is explained in this post :v:

Attached below more results that I obtained from my side :upside_down_face: