Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python dash log scale button

import plotly.graph_objects as go
import numpy as np
from plotly.offline import download_plotlyjs, init_notebook_mode,  iplot
init_notebook_mode(connected=True)

fig1 = go.Figure()

fig1.add_trace(go.Scatter(
    x=[0, 1, 2, 3, 4, 5, 6, 7],
    y=[8, 7, 6, 5, 4, 3, 2, 1]
))



fig1.update_layout(title_text="Switching between linear and log yaxis ",
                          updatemenus=[
            dict(
                 buttons=[
                     dict(label="Linear",  
                          method="relayout", 
                          args=[{"yaxis.type": "linear"}]),
                     dict(label="Log", 
                          method="relayout", 
                          args=[{"yaxis.type": "log"}]),
                                  ])]
            );
iplot(fig1)
Comment

PREVIOUS NEXT
Code Example
Python :: how to see directory from os module 
Python :: flask on gevent over https 
Python :: word counter python 
Python :: python loc 
Python :: dict map() 
Python :: how to strip whitespace in python 
Python :: pandas series remove element by index 
Python :: tkinter simple application 
Python :: sort values within groups pandas dataframe 
Python :: keras loss plot 
Python :: #pip install commands 
Python :: string to list python 
Python :: python if elif 
Python :: permutation of a string in python 
Python :: delete from list in python 
Python :: round to nearest multiple of 5 python 
Python :: python tobytes 
Python :: print binary tree python 
Python :: python remove dtype from array 
Python :: pandas get highest values row 
Python :: pandas split tuple column 
Python :: matplotlib default style 
Python :: python evaluate string 
Python :: get unique words from pandas dataframe 
Python :: python split string with a seperator 
Python :: Django delete a session value 
Python :: empty array python 
Python :: axvline matplotlib 
Python :: torch.from_numpy 
Python :: django check if get parameter exists 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =