0
In [14]: import seaborn as sns
    ...: import matplotlib.pyplot as plt
    ...: 
    ...: l = [41, 44, 46, 46, 47, 47, 48, 48, 49, 51, 52, 53, 53, 53, 53, 55, 55, 55,
    ...:      55, 56, 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 57, 57, 57, 58, 58, 58,
    ...:      58, 59, 59, 59, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 60, 60, 61,
    ...:      61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62, 62, 62,
    ...:      62, 63, 63, 63, 63, 63, 63, 63, 63, 63, 64, 64, 64, 64, 64, 64, 64, 65,
    ...:      65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 66, 66,
    ...:      67, 67, 67, 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 69, 69, 69, 70, 70,
    ...:      70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73,
    ...:      74, 74, 74, 74, 74, 75, 75, 75, 76, 77, 77, 78, 78, 79, 79, 79, 79, 80,
    ...:      80, 80, 80, 81, 81, 81, 81, 83, 84, 84, 85, 86, 86, 86, 86, 87, 87, 87,
    ...:      87, 87, 88, 90, 90, 90, 90, 90, 90, 91, 91, 91, 91, 91, 91, 91, 91, 92,
    ...:      92, 93, 93, 93, 94, 95, 95, 96, 98, 98, 99, 100, 102, 104, 105, 107, 108,
    ...:      109, 110, 110, 113, 113, 115, 116, 118, 119, 121]
    ...: 
    ...: sns.distplot(l, kde=True, rug=False)
    ...: 
/Users/congminmin/.venv/wbkg/lib/python3.7/site-packages/seaborn/distributions.py:2619: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms).
  warnings.warn(msg, FutureWarning)
Out[14]: <AxesSubplot:ylabel='Density'>
<Figure size 1008x720 with 1 Axes>

In [15]: plt.show()

In [16]: 

It doesn't give any error, as above in my iPython. UMAP is the same. If I put the code into a python file and run it, it doesn't show any visualization either, no error as well.

My OS: macOS Big Sur, 11.6

This is the first time to try seaborn and UMAP libraries, no success.

marlon
  • 6,029
  • 8
  • 42
  • 76
  • what do you mean by UMAP libraries? i only see pyplot and seaborn in this code – tdy Nov 12 '21 at 06:45
  • 1
    Yes. I didn't put umap in it, but it doesn't show either. – marlon Nov 12 '21 at 06:47
  • could be related to the backend. i don't know what's recommended for mac nowadays, but maybe you can try `matplotlib.use('TkAgg')` or `matplotlib.use('Qt5Agg')` – tdy Nov 12 '21 at 06:54
  • The first one doesn't help, but no error message. The 2nd one gives error messge ' Failed to import any qt binding'. – marlon Nov 12 '21 at 07:03
  • There is no error, only a warning. It is just telling that `distplot` is an old function that will be removed soon. You're encouraged to use `histplot` or one of its cousins instead. See seaborn's online documentation. – JohanC Nov 12 '21 at 12:19
  • @JohanC i don't think OP is referring to the warning -- i _think_ he's saying that no plot shows up even though there is no error (the wording is a bit confusing, but I believe that's what he means) – tdy Nov 12 '21 at 16:30

0 Answers0