Skip to content

Commit

Permalink
Merge pull request #346 from nschloe/label-comma
Browse files Browse the repository at this point in the history
handle commas in labels
  • Loading branch information
nschloe committed Oct 28, 2019
2 parents 6ff42d4 + e031e9d commit e44a75c
Show file tree
Hide file tree
Showing 59 changed files with 81 additions and 83 deletions.
2 changes: 1 addition & 1 deletion test/test_annotate_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
]{arrowstyle};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_arrows_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,4 @@
]{$|$-$|$};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_axvline_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_barchart_errorbars_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_barchart_legend_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
\draw[fill=red,draw opacity=0] (axis cs:2.125,0) rectangle (axis cs:2.375,1);
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_barchart_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
\draw[fill=red,draw opacity=0] (axis cs:2.125,0) rectangle (axis cs:2.375,1);
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_basic_sin_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@
\addlegendentry{cos}
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_boxplot_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_colorbars_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@
--cycle;
\end{groupplot}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_contourf_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6482,4 +6482,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_datetime_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_dual_axis_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_errorband_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_errorbar_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_escape_chars_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_externalize_tables_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_fancy_colorbar_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
\addplot graphics [includegraphics cmd=\pgfimage,xmin=-0.5, xmax=2.5, ymin=2.5, ymax=-0.5] {tmp-000.png};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_fancybox_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@
--cycle;
\end{groupplot}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_fillstyle_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_heat_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
\addplot graphics [includegraphics cmd=\pgfimage,xmin=-10, xmax=10, ymin=-10, ymax=10] {tmp-000.png};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_histogram_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
\draw[fill=color1,draw opacity=0,fill opacity=0.5] (axis cs:18.5564974311592,0) rectangle (axis cs:20.5521232113528,8);
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_image_plot_lower_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
\addplot graphics [includegraphics cmd=\pgfimage,xmin=-0.5, xmax=511.5, ymin=-0.5, ymax=511.5] {tmp-000.png};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_image_plot_upper_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
\addplot graphics [includegraphics cmd=\pgfimage,xmin=-0.5, xmax=511.5, ymin=511.5, ymax=-0.5] {tmp-000.png};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_legend3_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
\addlegendentry{ref}
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_legend_best_location_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -403,4 +403,4 @@
};
\end{groupplot}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_legend_columns_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
\addlegendentry{Test 2}
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_legend_labels_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@
\addlegendentry{y4}
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_legend_line_scatter_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
\addlegendentry{line}
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_legends2_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -419,4 +419,4 @@
};
\end{groupplot}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_legends_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@
\addlegendentry{Masked if < -0.5}
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_line_collection_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@

\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_line_color_marker_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_line_dashes_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_line_set_data_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_loglogplot_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_logplot_base_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_logplot_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_marker_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
3 changes: 1 addition & 2 deletions test/test_noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ def plot():
cax = ax.imshow(data, interpolation="nearest")
ax.set_title("Gaussian noise with vertical colorbar")

# Add colorbar, make sure to specify tick locations
# to match desired ticklabels.
# Add colorbar, make sure to specify tick locations to match desired ticklabels.
cbar = fig.colorbar(cax, ticks=[-1, 0, 1])
# vertically oriented colorbar
cbar.ax.set_yticklabels(["< -1", "0", "> 1"])
Expand Down
3 changes: 2 additions & 1 deletion test/test_noise2.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ def plot():

cbar = fig.colorbar(cax, ticks=[-1, 0, 1], orientation="horizontal")
# horizontal colorbar
cbar.ax.set_xticklabels(["Low", "Medium", "High"])
# Use comma in label
cbar.ax.set_xticklabels(["Low", "Medium", "High,Higher"])
return fig


Expand Down
4 changes: 2 additions & 2 deletions test/test_noise2_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

\begin{axis}[
colorbar horizontal,
colorbar style={xtick={-1,0,1},xticklabels={Low,Medium,High}},
colorbar style={xtick={-1,0,1},xticklabels={Low,Medium,{High,Higher}}},
colormap/viridis,
point meta max=1,
point meta min=-1,
Expand All @@ -20,4 +20,4 @@
\addplot graphics [includegraphics cmd=\pgfimage,xmin=-0.5, xmax=249.5, ymin=249.5, ymax=-0.5] {tmp-000.png};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_noise_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
\addplot graphics [includegraphics cmd=\pgfimage,xmin=-0.5, xmax=249.5, ymin=249.5, ymax=-0.5] {tmp-000.png};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_pandas_dataframe_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_patch_styles_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_patches_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,4 @@
\draw[draw=red,fill=red,opacity=0.4] (axis cs:0,1) circle (0.5);
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_quadmesh_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
\addplot graphics [includegraphics cmd=\pgfimage,xmin=0, xmax=6.28318530717959, ymin=0, ymax=6.28318530717959] {tmp-001.png};
\end{groupplot}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_scatter_colormap_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_scatter_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,4 @@
};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_sharex_and_y_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,4 @@
};
\end{groupplot}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_steps_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@
\addlegendentry{default}
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_subplot4x4_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@
};
\end{groupplot}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_subplots_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@
text=black,
rotate=0.0
]{\bfseries PLOT TITLE};
\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_subplots_with_colorbars_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
\addplot graphics [includegraphics cmd=\pgfimage,xmin=-0.5, xmax=2.5, ymin=2.5, ymax=-0.5] {tmp-002.png};
\end{groupplot}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_text_overlay_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@
]{test8};
\end{axis}

\end{tikzpicture}
\end{tikzpicture}
2 changes: 1 addition & 1 deletion test/test_tick_positions_reference.tex
Original file line number Diff line number Diff line change
Expand Up @@ -306,4 +306,4 @@
};
\end{groupplot}

\end{tikzpicture}
\end{tikzpicture}

0 comments on commit e44a75c

Please sign in to comment.