MCPcopy Index your code
hub / github.com/cpmech/plotpy / grid_functions_work

Function grid_functions_work

src/plot.rs:1339–1359  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1337
1338 #[test]
1339 fn grid_functions_work() {
1340 let mut plot = Plot::new();
1341 plot.grid_and_labels("xx", "yy").grid_labels_legend("xx", "yy").legend();
1342 let b: &str = "plt.gca().set_axisbelow(True)\n\
1343 plt.grid(linestyle='--',color='grey',zorder=-1000)\n\
1344 plt.gca().set_xlabel(r'xx')\n\
1345 plt.gca().set_ylabel(r'yy')\n\
1346 plt.gca().set_axisbelow(True)\n\
1347 plt.grid(linestyle='--',color='grey',zorder=-1000)\n\
1348 plt.gca().set_xlabel(r'xx')\n\
1349 plt.gca().set_ylabel(r'yy')\n\
1350 h,l=plt.gca().get_legend_handles_labels()\n\
1351 if len(h)>0 and len(l)>0:\n\
1352 \x20\x20\x20\x20leg=plt.legend(handlelength=3,ncol=1,loc='best')\n\
1353 \x20\x20\x20\x20add_to_ea(leg)\n\
1354 h,l=plt.gca().get_legend_handles_labels()\n\
1355 if len(h)>0 and len(l)>0:\n\
1356 \x20\x20\x20\x20leg=plt.legend(handlelength=3,ncol=1,loc='best')\n\
1357 \x20\x20\x20\x20add_to_ea(leg)\n";
1358 assert_eq!(plot.buffer, b);
1359 }
1360
1361 #[test]
1362 fn set_title_and_super_title_handle_quotes() {

Callers

nothing calls this directly

Calls 3

legendMethod · 0.80
grid_labels_legendMethod · 0.80
grid_and_labelsMethod · 0.80

Tested by

no test coverage detected