Source code for pydiana.shell.plotly_theme

import plotly.io as io
import plotly.express as px
io.templates['presentation']['layout']['xaxis']['ticks']="outside"
io.templates['presentation']['layout']['yaxis']['ticks']="outside"
io.templates['presentation']['layout']['yaxis']['exponentformat']='power'
io.templates['presentation']['layout']['xaxis']['exponentformat']='power'
io.templates['presentation']['layout']['font_family']='Times New Roman'
#io.templates['presentation']['layout']['font_family']='sans serif'
io.templates['presentation']['layout']['margin_l']=100
io.templates['presentation']['layout']['xaxis']['showline']=True
io.templates['presentation']['layout']['xaxis']['zeroline']=False
io.templates['presentation']['layout']['yaxis']['showline']=True
io.templates['presentation']['layout']['yaxis']['zeroline']=False
io.templates['presentation']['layout']['xaxis']['linewidth']=1
io.templates['presentation']['layout']['xaxis']['linecolor']="black"
io.templates['presentation']['layout']['yaxis']['linewidth']=1
io.templates['presentation']['layout']['yaxis']['linecolor']="black"
#To set intermediate ticks (only works on newer plotly versions)
io.templates['presentation']['layout']['xaxis'].minor={'ticks':"outside"}
io.templates['presentation']['layout']['yaxis'].minor={'ticks':"outside"}

"""
Setting marker size
"""
[docs] def change_global_marker_size(marker_size=6): for t in io.templates['presentation']['data']: tt=io.templates['presentation']['data'][t] if len(tt)>0: try: tt[0]['marker']['size']=marker_size except: continue
change_global_marker_size() io.templates.default = 'presentation' plotly_color_palette = px.colors.qualitative.D3