Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

dash log scale

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 union value without the same value in numpy 
Python :: flask app with spark 
Python :: command line arguments in python debugging 
Python :: merge 2 dataframes in python 
Python :: add gaussian noise python 
Python :: python dict access 
Python :: convert string to number python 
Python :: pandas dataframe row names 
Python :: python how to extract a string from another string 
Python :: python t test 
Python :: float64 python 
Python :: pandas dataframe from list how to make the date column an index 
Python :: access to specific column array numpy 
Python :: python3.8 
Python :: how to change datetime format to mmyy in dataframe 
Python :: python list to dataframe as row 
Python :: make value of two tables unique django 
Python :: python extract all characters from string before a character 
Python :: tkinter canas can you use other fonts 
Python :: align a text python 
Python :: docstrings in python 
Python :: include in flask 
Python :: 16 bit floating point numpy 
Python :: get data from kaggle to colab 
Python :: python print values inside request.POST 
Python :: import matplotlib sub 
Python :: Regular Expression to Stop at First Match 
Python :: df length 
Python :: how to import nltk 
Python :: how to post data to foreign key in django rest framework 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =