MCPcopy Create free account
hub / github.com/cpmech/plotpy / subplot_functions_work

Function subplot_functions_work

src/plot.rs:1304–1318  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1302
1303 #[test]
1304 fn subplot_functions_work() {
1305 let mut plot = Plot::new();
1306 plot.set_super_title("all subplots", None)
1307 .set_subplot(2, 2, 1)
1308 .set_horizontal_gap(0.1)
1309 .set_vertical_gap(0.2)
1310 .set_gaps(0.3, 0.4);
1311 let b: &str = "st=plt.suptitle(r'all subplots')\n\
1312 add_to_ea(st)\n\
1313 \nplt.subplot(2,2,1)\n\
1314 plt.subplots_adjust(wspace=0.1)\n\
1315 plt.subplots_adjust(hspace=0.2)\n\
1316 plt.subplots_adjust(wspace=0.3,hspace=0.4)\n";
1317 assert_eq!(plot.buffer, b);
1318 }
1319
1320 #[test]
1321 fn super_title_works() {

Callers

nothing calls this directly

Calls 5

set_gapsMethod · 0.80
set_vertical_gapMethod · 0.80
set_horizontal_gapMethod · 0.80
set_subplotMethod · 0.80
set_super_titleMethod · 0.80

Tested by

no test coverage detected