<jupyter_start><jupyter_text>Links Color Mixer. W3school https://www.w3schools.com/colors/colors_mixer.aspDocumentação Pandas sobre parallel_coordinate:- https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/_misc.py- https://pandas.pydata.org/pandas-docs/stable/visualization.htmlparallel-coordinatesSobre kwargs do método plot do matplotlib:- https://matplotlib.org/api/_as_gen/matplotlib.pyplot.plot.htmlLegendas do Matplotlib:- https://matplotlib.org/api/legend_api.htmlColor Map do matplotlib:- https://matplotlib.org/users/colormaps.html<jupyter_code>dfData = DATA.melt(id_vars=['Modelo de colisao', 'simulacao'],
          value_vars=['node 1', 'node 2', 'node 3', 'node 4', 'node 5'],
          var_name='node',
          value_name = 'PRR'
         )
dfData.head(10)
dfData.dtypes
plt.figure(figsize=(15,5))
g = sns.pointplot(x="node", y="PRR", hue="simulacao", data=dfData,
                  palette="RdYlBu",
                  aspect=.75,
                  size=7
                 )
plt.figure(figsize=(15,5))
g = sns.pointplot(x="node", y="PRR", hue="Modelo de colisao", data=dfData,
                  palette="RdYlBu",
                  aspect=.75,
                  size=7
                 )

# sns.barplot(x="node", y="PRR",hue='Modelo de colisao', data=dfData, ci=90.0)
# plt.figure(figsize=(15,5))
# fig = sns.barplot(x="simulacao", y="PRR",hue='node', data=dfData, ci=90.0)
# fig.legend(bbox_to_anchor=(1.1, 1.05))
# fig.set_title("Packet Received Rate - PRR")
plt.figure(figsize=(15,5))
fig = sns.barplot(x="node", y="PRR",hue='simulacao', data=dfData, ci=90.0, palette='RdYlBu_r')
fig.legend(bbox_to_anchor=(1.1, 1.05))
fig.set_title("Packet Received Rate - PRR")

# AQUI ELE ESTÁ PEGANDO OS TRÊS MODELOS DE COLISÃO E AGREGANDO ELES
# select = ()

# plt.figure(figsize=(15,5))
# fig = sns.barplot(x="node", y="PRR",hue='simulacao', data=dfData, ci=None, palette='RdYlBu_r')
# fig.legend(bbox_to_anchor=(1.1, 1.05))
# fig.set_title("Packet Received Rate - PRR")
df = dfData[dfData['simulacao'] != 'PB']
df = df[df['simulacao'] != 'PA']

g = sns.factorplot(x="node", y="PRR", hue="Modelo de colisao", col="simulacao", data=df,
                   kind='bar',
                   col_wrap=3,
                   capsize=.2,
                   palette="Blues_r",
                   size=3,
                   aspect=1)

# g.despine(left=True)
# select = (dfData['Modelo de colisao'] != 2)
# select = (dfData['simulacao'] != 'PB')& (dfData['simulacao'] != 'PA') & (df['Modelo de colisao'] != 2)
select = (dfData['Modelo de colisao'] != 2) & (dfData['node'] != 'node 2') & (dfData['node'] != 'node 4')
df = dfData[select]

g = sns.factorplot(x="node", y="PRR", hue="simulacao", col="Modelo de colisao", data=df,
                   kind='bar',
                   ci=90.0,
                   capsize=.2,
                   palette='tab20c',
                   size=3,
                   aspect=2)

# pb = dfData[(dfData['simulacao'] == 'PB') & (df['InterfModel'] != 2)]
# pa = dfData[(dfData['simulacao'] == 'PA') & (df['InterfModel'] != 2)]

# g.map(plt.plot,'node', 'PRR', pa)
# g.map(plt.plot,'node', 'PRR', pb)
# select = (dfData['simulacao'] != 'PB') & (dfData['simulacao'] != 'PA') & (dfData['Modelo de colisao'] != 2)
select = (dfData['node'] != 'node 2') & (dfData['node'] != 'node 4') & (dfData['Modelo de colisao'] != 2)
df = dfData[select]

grid = sns.FacetGrid(df,
              col='Modelo de colisao',
              hue='node',
              size=3,
              aspect=2,
              palette="tab10",
              legend_out=True
             )
ax = grid.map(plt.bar,'simulacao', 'PRR',alpha=0.8).add_legend()
grid.set(ylim=(0,1.05))
select = (dfData['simulacao'] != 'PB') & (dfData['simulacao'] != 'PA') & (df['Modelo de colisao'] != 2)
df = dfData[select]

grid = sns.FacetGrid(df,
              col='Modelo de colisao',
              hue='node',
              size=3,
              aspect=2,
              sharey=False,
              palette="tab10",
              legend_out=True
             )
ax = grid.map(plt.scatter,'simulacao', 'PRR',alpha=0.8).add_legend()
grid.set(ylim=(0,1.05))
g = sns.factorplot(x="simulacao", y="PRR", hue="node", col="Modelo de colisao", data=df,
                   kind='point',
                   col_wrap=3,
                   join=True,
                   palette="Set1",
                   markers='.',
                   size=3,
                   aspect=1.5)
g.set(ylim=(0,1.05))
g.set()
g = sns.factorplot(x="node", y="PRR", hue="Modelo de colisao", col="simulacao", data=df,
                   kind='point',
                   col_wrap=3,
                   join=True,
                   palette="Set1",
                   markers='.',
                   size=2.5,
                   aspect=2)
g.set(ylim=(0,1.05))
g = sns.factorplot(x="simulacao", y="PRR", hue="Modelo de colisao", col="node", data=df,
                   kind='point',
                   col_wrap=2,
                   join=True,
                   palette="tab10",
                   markers='.',
                   size=2.5,
                   aspect=2)

g.set(ylim=(0,1.1))
g = sns.factorplot(x="node", y="PRR", hue="simulacao", col="Modelo de colisao", data=dfData,
                   kind='point',
                   col_wrap=2,
                   join=True,
                   palette="gist_rainbow",
                   markers=['o','o','x','x','x','x','x','x','x','x','x'],
                   linestyles='-',
                   size=3,
                   aspect=2)

g.set(ylim=(0,1.1))
# g = sns.FacetGrid(df,col="InterfModel", col_wrap=2, size=3, aspect=2,hue='simulacao')
# g.map(plt.plot,'node','PRR', marker='.')
# g.set(ylim=(0,1.05))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18896262661543836, 'fraction_numerical': 0.024100593782745372, 'mean_word_length': 2.2725714285714287, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '562645', 'license': 'MIT', 'n_tokens_mistral': 2213, 'n_tokens_neox': 2103, 'n_words': 334, 'path': 'Rascunhos/Analise-Comportamento-PRR.ipynb', 'repo_name': 'GiliardGodoi/LeCAD-CL-Bin-analise', 'size': '5726'}