@@ -26,7 +26,8 @@ def get_tikz_code(
26
26
tex_relative_path_to_data = None ,
27
27
strict = False ,
28
28
wrap = True ,
29
- extra = None ,
29
+ extra_axis_opt = None ,
30
+ extra_picture_opt = None ,
30
31
dpi = None ,
31
32
show_info = True
32
33
):
@@ -83,9 +84,13 @@ def get_tikz_code(
83
84
Default is ``True``.
84
85
:type wrap: bool
85
86
86
- :param extra : Extra axis options to be passed (as a set) to pgfplots.
87
+ :param extra_axis_opt : Extra axis options to be passed (as a set) to pgfplots.
87
88
Default is ``None``.
88
- :type extra: a set of strings for the pfgplots axes.
89
+ :type extra_axis_opt: a set of strings for the pfgplots axes.
90
+
91
+ :param extra_picture_opt: Extra tikzpicture options to be passed (as a set) to pgfplots.
92
+ Default is ``None``.
93
+ :type extra_picture_opt: a set of strings for the pfgplots tikzpicture.
89
94
90
95
:param dpi: The resolution in dots per inch of the rendered image in case
91
96
of QuadMesh plots. If ``None`` it will default to the value
@@ -121,11 +126,16 @@ def get_tikz_code(
121
126
# had \addlegendimage added. There should be only one \addlegenimage per
122
127
# bar chart data series.
123
128
data ['rectangle_legends' ] = set ()
124
- if extra :
125
- data ['extra axis options [base]' ] = extra .copy ()
129
+ if extra_axis_opt :
130
+ data ['extra axis options [base]' ] = extra_axis_opt .copy ()
126
131
else :
127
132
data ['extra axis options [base]' ] = set ()
128
133
134
+ if extra_picture_opt :
135
+ data ['extra picture options' ] = extra_picture_opt .copy ()
136
+ else :
137
+ data ['extra picture options' ] = set ()
138
+
129
139
if dpi is None :
130
140
savefig_dpi = mpl .rcParams ['savefig.dpi' ]
131
141
if isinstance (savefig_dpi , int ):
@@ -152,6 +162,9 @@ def get_tikz_code(
152
162
# write the contents
153
163
if wrap :
154
164
code += '\\ begin{tikzpicture}\n \n '
165
+ for options in data ['extra picture options' ]:
166
+ code += options + ',\n '
167
+
155
168
156
169
coldefs = _get_color_definitions (data )
157
170
if coldefs :
0 commit comments