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

Function gridspec_functions_work

src/plot.rs:1642–1655  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1640
1641 #[test]
1642 fn gridspec_functions_work() {
1643 let mut plot = Plot::new();
1644 plot.set_gridspec("the_grid", 2, 2, "wspace=0.1,hspace=0.2")
1645 .set_subplot_grid("the_grid", "0:2", "0")
1646 .set_rotation_ticks_x(55.0)
1647 .set_rotation_ticks_y(45.0)
1648 .set_align_labels();
1649 let b: &str = "grid_the_grid=plt.GridSpec(2,2,wspace=0.1,hspace=0.2)\n\
1650 \nplt.subplot(grid_the_grid[0:2,0])\n\
1651 plt.gca().tick_params(axis='x',rotation=55)\n\
1652 plt.gca().tick_params(axis='y',rotation=45)\n\
1653 plt.gcf().align_labels()\n";
1654 assert_eq!(plot.buffer, b);
1655 }
1656
1657 #[test]
1658 fn set_labels_3d_works() {

Callers

nothing calls this directly

Calls 5

set_align_labelsMethod · 0.80
set_rotation_ticks_yMethod · 0.80
set_rotation_ticks_xMethod · 0.80
set_subplot_gridMethod · 0.80
set_gridspecMethod · 0.80

Tested by

no test coverage detected