Yahoo Search Busca da Web

Resultado da Busca

  1. 17 de mai. de 2021 · Viewed 4k times. -1. below are my values for x and y coordinates. import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns sns.set () x = np.random.randint (1,10,10) y = np.random.randint (-100,10,10) plt.scatter (x,y) how do I change max and min values for x and y coordinates for instance.

  2. 27 de ago. de 2015 · The title says, 'How to save a Seaborn plot into a file' which is more general. Unluckily the proposed solution works with pairplot, but it raises an exception with other 'kinds' of plots. Hopefully in future releases there will a more unified way to obtain the 'figure' object from a seaborn plot.

  3. These methods are applicable to plots generated with seaborn and pandas.DataFrame.plot, which both use matplotlib. Plot multiple horizontal lines by passing a list to the y parameter. y can be passed as a single location: y=40; y can be passed as multiple locations: y=[39, 40, 41] Also matplotlib.axes.Axes.hlines for the object oriented api.

  4. 1 de jun. de 2023 · Any seaborn plots suported by facetgrid won't work with (e.g. catplot) g.set_xticklabels(rotation=30) however barplot, countplot, etc. will work as they are not supported by facetgrid.

  5. 11 de nov. de 2023 · You can also set figure size by passing dictionary to rc parameter with key 'figure.figsize' in seaborn set_theme method (which replaces the set method, deprecated in v0.11.0 (September 2020)) import seaborn as sns. sns.set_theme(rc={'figure.figsize':(11.7,8.27)}) Other alternative may be to use figure.figsize of rcParams to set figure size as ...

  6. See How to rotate xticklabels in a seaborn catplot for the figure-level functions. If there's no need to change the xticklabels, the easiest option is ax.tick_params(axis='x', labelrotation=45), but horizontalalignment / ha can't be set. ax.set_xticks can be used with ax.get_xticks and ax.get_xticklabels.

  7. The canonical way of formatting the tick labels in the standard units is to use an EngFormatter.There is also an example in the matplotlib docs.

  8. 23 de fev. de 2016 · I am using scikit-learn for classification of text documents(22000) to 100 classes. I use scikit-learn's confusion matrix method for computing the confusion matrix.

  9. 20 de jul. de 2017 · 1. Here are some other ways to edit the legend of a seaborn figure (as of seaborn 0.13.2). Since the legend here comes from the column passed to hue, the easiest method (and one that requires the least work imo), as mentioned in comments, is to add a column to the dataframe and use it as the hue variable.

  10. 21 de ago. de 2016 · First, you have to notice that 'Date' column is a series of 'datetime' type so you should do that to get the 'date' part: df['Date'] = df['Date'].map(lambda x:x.date()) now group your data frame by 'Date' and then reset index in order to make 'Date' a column (not an index). Then you can use plt.plot_date.

  1. As pessoas também buscaram por