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

Function super_title_works

src/plot.rs:1321–1336  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1319
1320 #[test]
1321 fn super_title_works() {
1322 let mut params = SuperTitleParams::new();
1323 params
1324 .set_x(123.3)
1325 .set_y(456.7)
1326 .set_align_horizontal("left")
1327 .set_align_vertical("bottom")
1328 .set_fontsize(12.0)
1329 .set_fontweight(10.0);
1330 let mut plot = Plot::new();
1331 plot.set_super_title("all subplots", Some(&params));
1332 let b: &str =
1333 "st=plt.suptitle(r'all subplots',x=123.3,y=456.7,ha='left',va='bottom',fontsize=12,fontweight=10)\n\
1334 add_to_ea(st)\n";
1335 assert_eq!(plot.buffer, b);
1336 }
1337
1338 #[test]
1339 fn grid_functions_work() {

Callers

nothing calls this directly

Calls 7

set_fontweightMethod · 0.80
set_yMethod · 0.80
set_xMethod · 0.80
set_super_titleMethod · 0.80
set_fontsizeMethod · 0.45
set_align_verticalMethod · 0.45
set_align_horizontalMethod · 0.45

Tested by

no test coverage detected