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
To handle the bar3
functionality in fig2plotly
, it is necessary to set the optional 'TreatAs'
parameter to 'bar3'
. Let’s see how this works, with the following example
load count.dat
Z = count(1:10,:);
figure
bar3(Z)
title('Detached Style');
fig2plotly(gcf, 'offline', false, 'TreatAs', 'bar3'); % set to work for online mode
When running the previous MATLAB code we will obtain the results shown in the following image
As we can see, the previous image is a screenshot that I made of both the MATLAB plot (on the left) and the beautiful chart created by Plotly (on the right) in Chart-Studio (since we set the online mode). It was really worth using fig2plotly
to create the bar3
chart in plotly, right?
By following this link, you will be able to delight yourself with this beautiful 3D bar chart in Plotly Chart-Studio directly
In this repository folder you can find more examples using MATLAB’s bar3 functionality. Please feel free to recreate those examples with fig2plotly using what is explained in this post
Attached below more results that I obtained from my side