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

Function draw_works_1

src/barplot.rs:347–358  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

345
346 #[test]
347 fn draw_works_1() {
348 let xx = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
349 let yy = [5, 4, 3, 2, 1, 0, 1, 2, 3, 4];
350 let mut bar = Barplot::new();
351 bar.draw(&xx, &yy);
352 let b: &str = "x=np.array([0,1,2,3,4,5,6,7,8,9,])\n\
353 y=np.array([5,4,3,2,1,0,1,2,3,4,])\n\
354 p=plt.bar(x,y)\n";
355 assert_eq!(bar.buffer, b);
356 bar.clear_buffer();
357 assert_eq!(bar.buffer, "");
358 }
359
360 #[test]
361 fn draw_works_2() {

Callers

nothing calls this directly

Calls 2

drawMethod · 0.45
clear_bufferMethod · 0.45

Tested by

no test coverage detected