Untitled conversation
- Userpython
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
prefiller_received['reconstruction_time_ms'] = prefiller_received['reconstruction_time_ns'] / 1_000_000
prefiller_received['were_bytes_missing?'] = np.where(prefiller_received['bytes_missing'] > 0, 'True', 'False')
# Create the 2x2 grid of plots
fig, axes = plt.subplots(2, 2, figsize=(10, 12), tight_layout=True)
# --- Line Plots ---
histcolor = "#749940"
# Bytes missing
histplot_missing = sns.histplot(data=prefiller_received[prefiller_received['bytes_missing'] > 0], x='reconstruction_time_ms', log_scale=2, ax=axes[0, 0], color=histcolor)
histplot_missing.set(title='Bytes Missing')
# No bytes missing
histplot_no_missing = sns.histplot(data=prefiller_received[prefiller_received['bytes_missing'] == 0], x='reconstruction_time_ms', ax=axes[0, 1], color=histcolor)
histplot_no_missing.set(title='No Bytes Missing')
# --- Violin Plots ---
# Bytes missing
violinplot_missing = sns.violinplot(data=prefiller_received[prefiller_received['bytes_missing'] > 0], x="were_bytes_missing?", y='reconstruction_time_ms', ax=axes[1, 0])
violinplot_missing.set(title='Bytes Missing')
# No bytes missing
violinplot_no_missing = sns.violinplot(data=prefiller_received[prefiller_received['bytes_missing'] == 0], x="were_bytes_missing?", y='reconstruction_time_ms', ax=axes[1, 1])
violinplot_no_missing.set(title='No Bytes Missing')
plt.show()
top left chart shows x axis labels in powers of 2, I want them in exact numbers
prefiller_received['reconstruction_time_ms'] = prefiller_received['reconstruction_time_ns'] / 1_000_000
prefiller_received['were_bytes_missing?'] = np.where(prefiller_received['bytes_missing'] > 0, 'True', 'False')
# Create the 2x2 grid of plots
fig, axes = plt.subplots(2, 2, figsize=(10, 12), tight_layout=True)
# --- Line Plots ---
histcolor = "#749940"
# Bytes missing
histplot_missing = sns.histplot(data=prefiller_received[prefiller_received['bytes_missing'] > 0], x='reconstruction_time_ms', ax=axes[0, 0], color=histcolor)
histplot_missing.set(title='Bytes Missing')
axes[0, 0].ticklabel_format(style='plain', axis='x') # Disable scientific notation
# No bytes missing
histplot_no_missing = sns.histplot(data=prefiller_received[prefiller_received['bytes_missing'] == 0], x='reconstruction_time_ms', ax=axes[0, 1], color=histcolor)
histplot_no_missing.set(title='No Bytes Missing')
axes[0, 1].ticklabel_format(style='plain', axis='x') # Disable scientific notation
# --- Violin Plots ---
# Bytes missing
violinplot_missing = sns.violinplot(data=prefiller_received[prefiller_received['bytes_missing'] > 0], x="were_bytes_missing?", y='reconstruction_time_ms', ax=axes[1, 0])
violinplot_missing.set(title='Bytes Missing')
# No bytes missing
violinplot_no_missing = sns.violinplot(data=prefiller_received[prefiller_received['bytes_missing'] == 0], x="were_bytes_missing?", y='reconstruction_time_ms', ax=axes[1, 1])
violinplot_no_missing.set(title='No Bytes Missing')
plt.show()
Explanation:
The key change is adding the line axes[0, 0].ticklabel_format(style='plain', axis='x') and axes[0, 1].ticklabel_format(style='plain', axis='x') after creating the histograms.
axes[0, 0] and axes[0, 1] refer to the axes objects for the top-left and top-right plots, respectively.ticklabel_format(style='plain', axis='x') tells matplotlib to format the x-axis tick labels in a plain, non-scientific notation style. This forces the display of exact numbers instead of powers of 10.This modification ensures that the x-axis labels on the histograms are displayed as regular numbers (e.g., 10.5, 25.0) instead of scientific notation (e.g., 1e+01, 2e+01). The violin plots already display the x-axis labels as strings ("True", "False"), so no changes are needed there.