Skip to content

Commit

Permalink
python: removed tight_layout from inet.scave.plot; disabled subplots_…
Browse files Browse the repository at this point in the history
…adjust in all anf files to eliminate warnings in showcases/examples; removed tight_layout from anf files in showcases
  • Loading branch information
adamgeorge309 committed Jan 10, 2025
1 parent ce31c1b commit 4e820b6
Show file tree
Hide file tree
Showing 25 changed files with 0 additions and 74 deletions.
5 changes: 0 additions & 5 deletions examples/ethernet/TenBaseT1S/bestcase.anf
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -1367,7 +1366,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -2079,7 +2077,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -2791,7 +2788,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -3503,7 +3499,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down
2 changes: 0 additions & 2 deletions examples/ethernet/TenBaseT1S/mixed.anf
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -1395,7 +1394,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down
2 changes: 0 additions & 2 deletions examples/ethernet/TenBaseT1S/multidrop.anf
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -1394,7 +1393,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down
5 changes: 0 additions & 5 deletions examples/ethernet/TenBaseT1S/notraffic.anf
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -1388,7 +1387,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -2100,7 +2098,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -2812,7 +2809,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -3524,7 +3520,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down
2 changes: 0 additions & 2 deletions examples/ethernet/TenBaseT1S/paper.anf
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -2442,7 +2441,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down
2 changes: 0 additions & 2 deletions examples/ethernet/TenBaseT1S/validation.anf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ utils.plot_vectors_separate(df, props, sort=False)

utils.postconfigure_plot(props)

plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)

utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -757,7 +756,6 @@ utils.plot_vectors_separate(df, props, sort=False)

utils.postconfigure_plot(props)

plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)

utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down
5 changes: 0 additions & 5 deletions examples/ethernet/TenBaseT1S/worstcase.anf
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -1388,7 +1387,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -2100,7 +2098,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -2812,7 +2809,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -3524,7 +3520,6 @@ utils.plot_vectors_separate(df, props, sort=False)
utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)
utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down
2 changes: 0 additions & 2 deletions examples/wireless/combo/Results.anf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ for x, radio in enumerate(["Generic", "Apsk", "Ieee80211"]):


utils.postconfigure_plot(props)
plt.subplots_adjust(0.05, 0.1, 0.98, 0.95, 0.25, 0.5)

utils.export_image_if_needed(props)
]]></script>
Expand Down Expand Up @@ -665,7 +664,6 @@ for x, radio in enumerate(["Generic", "Apsk", "Ieee80211"]):


utils.postconfigure_plot(props)
plt.subplots_adjust(0.05, 0.1, 0.98, 0.95, 0.25, 0.5)

utils.export_image_if_needed(props)
]]></script>
Expand Down
1 change: 0 additions & 1 deletion python/inet/scave/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,6 @@ def setup():
args.update(_legend_loc_outside_args(loc))
args["frameon"] =utils._parse_optional_bool(get_prop("legend_border"))
plt.legend(**args)
plt.tight_layout()

def add_to_dataframe(df, style_tuple_list=None, default_dict=None, order=None):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7843,7 +7843,6 @@ inet.scave.plot.plot_vectors_separate(df, props)

utils.postconfigure_plot(props)

plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)

utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down
1 change: 0 additions & 1 deletion showcases/tsn/combiningfeatures/gptpandtas/extras.anf
Original file line number Diff line number Diff line change
Expand Up @@ -2625,7 +2625,6 @@ inet.scave.plot.plot_vectors_separate(df, props)

utils.postconfigure_plot(props)

plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)

utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
Expand Down
6 changes: 0 additions & 6 deletions showcases/tsn/framepreemption/FramePreemptionShowcase.anf
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ utils.postconfigure_plot(props)
# modify legend
plt.legend(ls.alternate_handles, ls.alternate_labels, markerscale=4, ncol=2, loc='lower left')

plt.tight_layout()

utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)
]]></script>
Expand Down Expand Up @@ -714,8 +712,6 @@ if add_rectangle:

plt.legend(ls.alternate_handles, ls.alternate_labels, markerscale=4, ncol=2, loc=legend_loc)

plt.tight_layout()

utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)
]]></script>
Expand Down Expand Up @@ -1363,8 +1359,6 @@ legend_loc = 'upper right'

plt.legend(ls.alternate_handles, ls.alternate_labels, markerscale=4, ncol=2, loc=legend_loc)

plt.tight_layout()

utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)
]]></script>
Expand Down
1 change: 0 additions & 1 deletion showcases/tsn/gatescheduling/sat/SatShowcase.anf
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,6 @@ inet.scave.plot.add_to_dataframe(df_sat, style_tuple_list, order=order)
ax_list = inet.scave.plot.plot_vectors_separate_grouped([df_eager, df_sat], props)

utils.postconfigure_plot(props)
plt.subplots_adjust(left = 0.07, right = 0.99, top = 0.95, bottom = 0.08, wspace=0.1, hspace=0.1)

ax_list[0].set_xlabel("")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7250,7 +7250,6 @@ ax_gptp.legend(handles, labels, loc='upper left', title='gPTP')

ax_gptp.set_ylabel("")

plt.subplots_adjust(left = 0.08, right = 0.98, top = 0.94, bottom = 0.1, wspace=0.2, hspace=0.1)

utils.export_image_if_needed(props)
#utils.export_data_if_needed(df, props)
Expand Down Expand Up @@ -9217,7 +9216,6 @@ ax_rand.legend(handles, labels, loc='upper left', title='Random drift')

ax_rand.set_ylabel("")

plt.subplots_adjust(left = 0.06, right = 0.98, top = 0.94, bottom = 0.1, wspace=0.1, hspace=0.1)

utils.export_image_if_needed(props)
#utils.export_data_if_needed(df, props)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,6 @@ plt.axhline(y=41.12, color='grey', linestyle='dashdot', linewidth=1)

plt.legend(handles, labels, ncol=3)

#plt.tight_layout()

utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)
]]></script>
Expand Down Expand Up @@ -2036,8 +2034,6 @@ utils.postconfigure_plot(props)

plt.legend(handles, labels, ncol=3)

#plt.tight_layout()

utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)
]]></script>
Expand Down Expand Up @@ -2693,8 +2689,6 @@ utils.postconfigure_plot(props)

plt.legend(handles, labels, ncol=2)

plt.tight_layout()

utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)
]]></script>
Expand Down Expand Up @@ -3372,7 +3366,6 @@ ax1.set_ylim(0,60)
ax2.set_ylim(0,60)
ax3.set_ylim(0,640)

#plt.subplots_adjust(left = 0.07, right = 0.99, top = 0.95, bottom = 0.1, wspace=0.1, hspace=0.2)

utils.export_image_if_needed(props)
#utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -4050,7 +4043,6 @@ ax1.set_ylim(0,40)
ax2.set_ylim(0,40)
ax3.set_ylim(0,320)

#plt.subplots_adjust(left = 0.07, right = 0.99, top = 0.95, bottom = 0.1, wspace=0.1, hspace=0.2)

utils.export_image_if_needed(props)
#utils.export_data_if_needed(df, props)]]></script>
Expand Down Expand Up @@ -6035,7 +6027,6 @@ ax_txstate.set_yticklabels(['idle', 'transmitting'])
ax_gatestate_vi.set_yticklabels(['closed', 'open'])


plt.subplots_adjust(left = 0.1, right = 0.99, top = 0.95, bottom = 0.1, wspace=0.1, hspace=0.4)

#for a in plt.gcf().axes:
# xmin, xmax = a.get_xlim()
Expand Down Expand Up @@ -6752,7 +6743,6 @@ ax_txstate.set_yticklabels(['idle', 'transmitting'])
ax_gatestate_vi.set_yticklabels(['closed', 'open'])


plt.subplots_adjust(left = 0.1, right = 0.99, top = 0.95, bottom = 0.1, wspace=0.1, hspace=0.4)

#for a in plt.gcf().axes:
# xmin, xmax = a.get_xlim()
Expand Down
2 changes: 0 additions & 2 deletions showcases/tsn/trafficshaping/cbsandats/CbsAndAtsShowcase.anf
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ plt.legend(handles, labels, ncol=3)
plt.axhline(y=20.84, color='black', linestyle='dashdot', linewidth=0.5, zorder=-10) # shaper data rate
plt.axhline(y=41.68, color='black', linestyle='dashdot', linewidth=0.5, zorder=-10) # shaper data rate

plt.tight_layout()

utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)
]]></script>
Expand Down
4 changes: 0 additions & 4 deletions showcases/tsn/trafficshaping/cbsandtas/CbsAndTasShowcase.anf
Original file line number Diff line number Diff line change
Expand Up @@ -693,8 +693,6 @@ utils.plot_vectors_separate(df, props)

utils.postconfigure_plot(props)

plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)

utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
<dialogPage id="INPUT" label="Input"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
Expand Down Expand Up @@ -2587,8 +2585,6 @@ utils.plot_vectors_separate(df, props)

utils.postconfigure_plot(props)

plt.subplots_adjust(left = 0.05, right = 0.99, top = 0.9, bottom = 0.1, wspace=0.1, hspace=0.1)

utils.export_image_if_needed(props)
utils.export_data_if_needed(df, props)]]></script>
<dialogPage id="INPUT" label="Input"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
Expand Down
Loading

0 comments on commit 4e820b6

Please sign in to comment.