Remove space between subplots in Plotly?

Yes there is! You can use specs and vertical_spacing or horizontal_spacing. Here is an example for horizontal_spacing: from plotly import tools import plotly.plotly as py from plotly.graph_objs import * trace1 = Scatter( x=[1, 2, 3], y=[4, 5, 6] ) trace2 = Scatter( x=[20, 30, 40], y=[50, 60, 70], ) fig = tools.make_subplots(rows = 1, cols … Read more

How to change plotly figure size

Have you considered to use fig.update_layout( autosize=False, width=800, height=800,) and eventually reduce the size of your marker? UPDATE Full Code import plotly.graph_objs as go trace1 = go.Scatter( x=x1_tsne, # x-coordinates of trace y=y1_tsne, # y-coordinates of trace mode=”markers +text “, # scatter mode (more in UG section 1) text = label3, opacity = 1, textposition=’top … Read more

Plotly notebook mode with google colaboratory

plotly version 4.x As of version 4, plotly renderers know about Colab, so the following is sufficient to display a figure in both Colab and Jupyter (and other notebooks like Kaggle, Azure, nteract): import plotly.graph_objects as go fig = go.Figure( go.Scatter(x=[1,2,3], y=[1,3,2] ) ) fig.show() plotly version 3.x Here’s an example showing the use of … Read more

plot.ly offline mode in jupyter lab not displaying plots

A couple things might be happening. For some reason is your Notebook “Not Trusted?” This will stop the Plotly javascript from rendering anything below. Another possibility is that you don’t have the Plotly extension installed for Jupyter Lab. In Lab, as compared to Notebooks, there are a lot more restrictions on what javascript can execute, … Read more

TypeError: load() missing 1 required positional argument: ‘Loader’ in Google Colab

Now, the load() function requires parameter loader=Loader. If your YAML file contains just simple YAML (str, int, lists), try to use yaml.safe_load() instead of yaml.load(). And If you need FullLoader, you can use yaml.full_load(). Starting from pyyaml>=5.4, it doesn’t have any discovered critical vulnerabilities, pyyaml status. source: https://stackoverflow.com/a/1774043/13755823 yaml.safe_load() should always be preferred unless you … Read more