Hi all!
I’m doing some plots for a series of data. Since I needed to multiply two columns, and plot the output in a box plot, I came up with this:
adc_I_symbol = Symbol("Arc ADC Current (A)")
adc_V_symbol = Symbol("Arc ADC Voltage (V)")
usb_variations = boxplot(0, title="Powers (V*I)")
@df df_normal boxplot!(cols(adc_I_symbol) .* cols(adc_V_symbol), label = "sub_r5_r4_255")
@df df_normal_0 boxplot!(cols(adc_I_symbol) .* cols(adc_V_symbol), label = "sub_r5_r4_0")
@df df_normal_31 boxplot!(cols(adc_I_symbol) .* cols(adc_V_symbol), label = "add_r5_r4_31")
@df df_USB boxplot!(cols(adc_I_symbol) .* cols(adc_V_symbol), label = "sub_r5_r4_255 (USB)")
@df df_USB_0 boxplot!(cols(adc_I_symbol) .* cols(adc_V_symbol), label = "sub_r5_r4_0 (USB)")
@df df_USB_31 boxplot!(cols(adc_I_symbol) .* cols(adc_V_symbol), label = "add_r5_r4_31 (USB)")
So, basically I first create an empty plot, then I populate it with the data. However, doing so won’t print the title. I can add it on the last call:
@df df_USB_31 boxplot!(cols(adc_I_symbol) .* cols(adc_V_symbol), label = "add_r5_r4_31 (USB)", title = "Powers (V*I)")
or on every call, but it clutters the code or make it slightly worse to maintain. Is there an idiomatic way to do this? I read that for example I can do that in Makie, but maybe I’m missing a simpler solution.
Thanks