def advanced_bar(): """ Compare the number of sites in the unit cell and eij_max of the first 5 samples from the piezoelectric_tensor dataset. """ # Format the general layout of our figure with 5 samples pf = PlotlyFig(df=load_dielectric_constant().iloc[:5], title='Comparison of 5 materials band gaps and n') # Plot! colors = ['red', 'orange', 'yellow', 'blue', 'green'] pf.bar(cols=['n', 'band_gap'], labels='formula', colors=colors)
def basic_bar(): pf = PlotlyFig() pf.bar(x=['var a', 'var b', 'var c'], y=[1, 2, 3])