Layout mess up switching tabs [duplicate]

I found that I made a duplicate question, my apologies!

Greetings.
I have recently upgraded all Dash packages, and plotly, to the latest version. In this regard I had to restructure some code like local CSS and the tab-layout of my application.

The problem is as follows:
As the app is launched, everything looks fine, yet I get an error with the following text:

plotly.graph_objs.Margin is deprecated.
    Please replace it with one of the following more specific types
      - plotly.graph_objs.layout.Margin.

The first time I visit a tab with some figures on it, everything looks fine but if i visit another tab and go back again the figures are placed wrongly and with different sizes.

The only place I am using go.Margins is within the following layout:

layout = go.Layout(
		title='Nede tider relative størrelser historisk',
		yaxis=dict(
			title='%',
			titlefont=dict(
				size=18
			)
		),
		xaxis=dict(
			dtick=1
		),
		bargap=0.5,
		height=225,
		margin=go.Margin(
			l=50,
			r=50,
			b=50,
			t=50,
			pad=4
		)
	)

Do I need to define Margins differently? I am trying to follow the example from this link:

Cheers. :slightly_smiling_face:

Putting some pictures of what is going on:
First visist:

Consecutive visit:

EDIT:
If I click anywhere on the slider I have bottom-right, the layout goes back to normal (first visit).

I have the same error returned, although my output seems to look ok, but I’m told:

plotly.graph_objs.Margin is deprecated.
Please replace it with one of the following more specific types
  - plotly.graph_objs.layout.Margin

Similarly to Blaceus I have:

'layout': go.Layout(
            height = 400,
            width = 400,
            margin=go.Margin(
                    t=5,
                    b=5,
                    l=20,
                    r=20,
                    pad=5
                ),

I don’t quite understand the error message, how should I be reformatting this?

I do not have this problem anymore, and frankly I have forgotten how I got rid of it… I small hunch tells me that it was actually not a go.Margin error, but rather how I structured/populated my tabs…

Have you tried updating all your plot.ly Dash libraries? That’ve put me out of a pickle more than once. :slightly_smiling_face: