Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reset seaborn
#1
Hi there,

Following some tipps I somehow changed some global settings in seaborn and I would like to reset everything concerning seaborn and matplotlib.
It seems I shifted the y-axis somehow.

import pandas as pd
import numpy as np
from random import * # random numbers

import matplotlib.pyplot as plt
import seaborn as sns

import importlib
importlib.reload(mpl); importlib.reload(plt); importlib.reload(sns)

df = pd.DataFrame(np.random.randint(0,100,size=(10, 2)), columns=list('AB'))
print(df)


a4_dims = (11.7, 8.27)
fig, ax = plt.subplots(figsize=a4_dims)
seaborn.violinplot(y=df["A"], data=df)
fig = ax.get_figure()
fig.savefig('minimal_violinplot.png', dpi=300)
I have tried out something like:

import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns

import importlib
importlib.reload(mpl); importlib.reload(plt); importlib.reload(sns)
in the preamble, which does not work. Neither:

sns.reset_orig()
Any ideas? I would be vrey grateful! Smile

Attached Files

Thumbnail(s)
   
Reply
#2
ju21878436312 likes this post
Reply
#3
(May-26-2021, 01:55 AM)Larz60+ Wrote:

Thank you and sorry for the late reply. It actually did not solve the problem with my violinplot. I am not sure where the error lies. I found a provisionary work-around, maybe I just need to reinstall.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Seaborn not displaying the specified n bins russellm10 0 541 Jun-28-2023, 02:51 AM
Last Post: russellm10
  Seaborn and Pandas russellm10 0 1,273 Nov-20-2021, 04:01 PM
Last Post: russellm10
  Seaborn regplot regression equation? Cricri 2 6,627 Jun-09-2020, 01:32 PM
Last Post: Cricri
  Seaborn clustermap clustered data YoYo1975 2 2,266 Feb-05-2020, 09:08 AM
Last Post: YoYo1975
  Error when installing Seaborn package using pip chawkins 3 5,541 Jul-16-2018, 12:12 AM
Last Post: Larz60+
  Why can't I import seaborn module? Athenaeum 1 6,436 Dec-09-2017, 08:40 AM
Last Post: buran
  Overlay two lines on a single seaborn plot pemfir 1 22,793 Oct-28-2016, 10:51 PM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020