-1

Hadn't messed with Seaborn in a while, so I was refreshing some basic concepts and came across this. When I load a basic plot using replot(), the graph doesn't load. It stops short from actually opening. However, if I use a scatterplot() instead, it loads just fine. Why? What am I missing?

penguins = sns.load_dataset('penguins')
sns.set(style='darkgrid')
sns.relplot(x='bill_length_mm',
            y='flipper_length_mm',data=penguins)
plt.show()

Using a scatterplot(), the graph loads without a problem.

sns.set(style='darkgrid')
sns.scatterplot(x='bill_length_mm',
            y='flipper_length_mm',data=penguins)
plt.show()
Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
PythonNoob
  • 93
  • 9

1 Answers1

1

Not sure what to tell you, it works fine for me. Do your other outputs match mine?

example Image

BeRT2me
  • 12,699
  • 2
  • 13
  • 31
  • Yep, exact same thing. Crazy... – PythonNoob Jun 22 '22 at 04:36
  • Are you using conda or pip to install? – BeRT2me Jun 22 '22 at 04:38
  • Yeah, in fact, I've just installed conda, and needles to say, it worked. I still want to know why's going on. I tried it on my other computer, and same thing; I hit a wall. The graph flashes momentarily on the screen, but it fails to fully load. Even stranger that it doesn't work on my other computer, yet it works for you and the other gent that commented on this post. – PythonNoob Jun 22 '22 at 04:43
  • 1
    I created a new env: `conda create -n deleteme python=3.10 matplotlib seaborn notebook` and then launched a notebook from that env, and it worked perfectly. – BeRT2me Jun 22 '22 at 04:54