@@ -36,10 +36,11 @@ defmodule Matplotex.Figure.Areal.PlotOptions do
3636 opts = Keyword . delete ( opts , :label )
3737 cmap = Keyword . get ( opts , :cmap )
3838 colors = Keyword . get ( opts , :colors )
39+ bottom = Keyword . get ( opts , :bottom )
3940
4041 % Figure {
4142 figure
42- | axes: axes |> struct ( opts ) |> cast_two_d_structs ( opts ) |> update_cmap ( cmap , colors )
43+ | axes: axes |> struct ( opts ) |> cast_two_d_structs ( opts ) |> update_cmap ( cmap , colors ) |> update_type ( bottom )
4344 }
4445 end
4546
@@ -63,13 +64,16 @@ defmodule Matplotex.Figure.Areal.PlotOptions do
6364 Keyword . drop ( opts , @ immutable_keys )
6465 end
6566 defp update_cmap ( axes , nil , colors ) when is_list ( colors ) do
66-
6767 % { axes | cmap: Colormap . fetch_cmap ( @ default_cmap ) }
6868 end
6969
7070 defp update_cmap ( axes , cmap , colors ) when is_list ( colors ) do
7171 % { axes | cmap: Colormap . fetch_cmap ( cmap ) }
7272 end
7373
74- defp update_cmap ( figure , _ , _ ) , do: figure
74+ defp update_cmap ( axes , _ , _ ) , do: axes
75+ defp update_type ( axes , nil ) , do: axes
76+ defp update_type ( axes , bottom ) when is_list ( bottom ) do
77+ % { axes | type: "stacked" }
78+ end
7579end
0 commit comments