Skip to content

Commit 9b8c7c0

Browse files
Graham Whaleygrahamwhaley
Graham Whaley
authored andcommitted
metrics: collectd: move legends under graphs
Move the legends under the graphs to give more width, and thus resolution, to the final pictures. This works well for the collectd graphs as they are spread out into sets of single column graphs per page. Signed-off-by: Graham Whaley <graham.whaley@intel.com>
1 parent bdcb4fb commit 9b8c7c0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

metrics/report/report_dockerfile/collectd_scaling.R

+8
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ mem_line_plot <- ggplot() +
435435
ylab("System Avail (Gb)") +
436436
scale_y_continuous(labels=comma, sec.axis=sec_axis(~ ./mem_scale, name="pods")) +
437437
ggtitle("System Memory free") +
438+
theme(legend.position="bottom") +
438439
theme(axis.text.x=element_text(angle=90))
439440

440441
page1 = grid.arrange(
@@ -473,6 +474,7 @@ cpu_line_plot <- ggplot() +
473474
xlab("seconds") +
474475
ylab("System CPU Idle (%)") +
475476
ggtitle("System CPU usage") +
477+
theme(legend.position="bottom") +
476478
theme(axis.text.x=element_text(angle=90))
477479

478480
page2 = grid.arrange(
@@ -497,6 +499,7 @@ boot_line_plot <- ggplot() +
497499
xlab("pods") +
498500
ylab("Boot time (s)") +
499501
ggtitle("Pod boot time") +
502+
theme(legend.position="bottom") +
500503
theme(axis.text.x=element_text(angle=90))
501504

502505
page3 = grid.arrange(
@@ -535,6 +538,7 @@ inode_line_plot <- ggplot() +
535538
ylab("inodes free") +
536539
scale_y_continuous(labels=comma, sec.axis=sec_axis(~ ./inode_scale, name="pods")) +
537540
ggtitle("inodes free") +
541+
theme(legend.position="bottom") +
538542
theme(axis.text.x=element_text(angle=90))
539543

540544
page4 = grid.arrange(
@@ -577,6 +581,7 @@ interface_packet_line_plot <- ggplot() +
577581
ylab("packets") +
578582
scale_y_continuous(labels=comma, sec.axis=sec_axis(~ ./ip_scale, name="pods")) +
579583
ggtitle("interface packets") +
584+
theme(legend.position="bottom") +
580585
theme(axis.text.x=element_text(angle=90))
581586

582587
oct_scale = max(c(max(ifoctetdata$tx, na.rm=TRUE),
@@ -609,6 +614,7 @@ interface_octet_line_plot <- ggplot() +
609614
ylab("octets") +
610615
scale_y_continuous(labels=comma, sec.axis=sec_axis(~ ./oct_scale, name="pods")) +
611616
ggtitle("interface octets") +
617+
theme(legend.position="bottom") +
612618
theme(axis.text.x=element_text(angle=90))
613619

614620
page5 = grid.arrange(
@@ -653,6 +659,7 @@ interface_drop_line_plot <- ggplot() +
653659
ylab("drops") +
654660
scale_y_continuous(labels=comma, sec.axis=sec_axis(~ ./drop_scale, name="pods")) +
655661
ggtitle("interface drops") +
662+
theme(legend.position="bottom") +
656663
theme(axis.text.x=element_text(angle=90))
657664

658665
# errors are often 0, so providing 1 so we won't scale by infinity
@@ -687,6 +694,7 @@ interface_error_line_plot <- ggplot() +
687694
ylab("errors") +
688695
scale_y_continuous(labels=comma, sec.axis=sec_axis(~ ./error_scale, name="pods")) +
689696
ggtitle("interface errors") +
697+
theme(legend.position="bottom") +
690698
theme(axis.text.x=element_text(angle=90))
691699

692700
page6 = grid.arrange(

0 commit comments

Comments
 (0)