# How to add input type to boxplot but remain its plot attribute

**URL:** <https://discourse.julialang.org/t/how-to-add-input-type-to-boxplot-but-remain-its-plot-attribute/44883>\
**Category:** General Usage\
**Tags:** question, plotting\
**Created:** [August 13, 2020, 3:50pm UTC](https://discourse.julialang.org/t/how-to-add-input-type-to-boxplot-but-remain-its-plot-attribute/44883 "2020-08-13T15:50:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![1634](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/1634/32/12119_2.png) [@1634](https://discourse.julialang.org/u/1634)\
**Post date:** [August 13, 2020, 3:50pm UTC](https://discourse.julialang.org/t/how-to-add-input-type-to-boxplot-but-remain-its-plot-attribute/44883/1 "2020-08-13T15:50:43Z")

</div>

Based on Oheil’s codes ([StackOverflowError with boxplot!() due to deprecation - #6 by oheil](https://discourse.julialang.org/t/stackoverflowerror-while-using-boxplot/44871/6)), I wish to add other optional plot attributes like label, dpi etc. I’ve tried to include them in the input in a primitive way as below but the input labels are still not employeed (so I commented them out)…Is there any way to add an input type to boxplot() without mining its original flexible plot attributes?

```julia
using StatsPlots
a=[ 0.000163187 0.000121895 0.000229244 6.98374e-6
         missing missing missing missing
        0.000347736 0.000385244 0.00025956 missing]
import StatsPlots.boxplot
function boxplot(m::Array{Union{Missing, Float64}}; labels::Array{String})
	bp=boxplot(dpi=300)
	# bp=boxplot(dpi=300,label=labels)
    for i in 1:size(m,2)
		bp=boxplot!(filter(!ismissing,m[:,i]))
		# bp=boxplot!(filter(!ismissing,m[:,i]),label=labels)
    end
    display(bp)
end

boxplot(a, ["1", "2", "3", "4"])

```

I found the description of @recipe ([Recipes · Plots](https://docs.juliaplots.org/latest/recipes/#Recipe-Types)) but haven’t figured out whether it’s what I am looking for or how to apply it in this case.

“ **The recipe type is determined completely by the dispatch signature.** Each recipe type is called from a different part of the [plotting pipeline](https://docs.juliaplots.org/latest/pipeline/), so you will choose a type of recipe to match how much processing you want completed before your recipe is applied.”
