diff --git a/README.md b/README.md index bb3dc49..d1e1646 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ pip install cosmoplots ``` If you want the development version you must first clone the repo to your local machine, -then install the project and its dependencies with [poetry]: +then install the project and its dependencies with [poetry](https://python-poetry.org): ```sh git clone https://github.com/uit-cosmo/cosmoplots.git @@ -63,11 +63,19 @@ for i in range(rows*columns): ax[i].set_xlabel("X Axis") ax[i].set_ylabel("Y Axis") ax[i].plot(i*a) +# plt.savefig("assets/multifig.png") plt.show() ``` ![multifig](./assets/multifig.png) +#### Position of the y-axis + +By default, the x-coordinates of the y-axis labels are aligned with the subfigure labels, but the y-axis label position can be adjusted using +```python +ax[i].yaxis.set_label_coords(x_coordinate, y_coordinate) +``` + ## `change_log_axis_base` ```python @@ -137,9 +145,6 @@ with plt.style.context("cosmoplots.default"): | :--------: | :--------: | | ![matplotlib](./assets/matplotlib.png) | ![cosmoplots](./assets/cosmoplots.png) | - -[poetry]: https://python-poetry.org - ## `generate_hex_colors` This function generates the hex numbers for the colours extracted from a `matplotlib` colour map based on the number of points of interest. @@ -152,7 +157,7 @@ plt.style.use(["cosmoplots.default"]) color_list = cosmoplots.generate_hex_colors(5, 'viridis', show_swatch=True, ascending=True) -plt.savefig("./assets/hex_colors.png") +# plt.savefig("./assets/hex_colors.png") # Print color_list to retrieve the hex numbers print(color_list) #['#fde725', '#5ec962', '#21918c', '#3b528b', '#440154'] @@ -162,7 +167,7 @@ ax = plt.gca() for i, color in enumerate(color_list): ax.plot([1,2],[i,i+1], c = color) -plt.savefig("./assets/hex_colors_example.png") +# plt.savefig("./assets/hex_colors_example.png") plt.show() ``` diff --git a/assets/concat.png b/assets/concat.png index c295ed1..2b2688f 100644 Binary files a/assets/concat.png and b/assets/concat.png differ diff --git a/assets/multifig.png b/assets/multifig.png index a58abff..6727228 100644 Binary files a/assets/multifig.png and b/assets/multifig.png differ diff --git a/pyproject.toml b/pyproject.toml index dda6e85..4f6fd47 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cosmoplots" -version = "0.4.3" +version = "0.5.0" description = "Routines to get a sane default configuration for production quality plots." homepage = "https://github.com/uit-cosmo/cosmoplots" authors = ["gregordecristoforo "]