Skip to content

Commit

Permalink
Testing whether I fixed the plotting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidT3 committed Jan 28, 2025
1 parent 69a2376 commit 8e4cfbc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions xga/products/relation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This code is a part of X-ray: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
# Last modified by David J Turner ([email protected]) 28/01/2025, 13:06. Copyright (c) The Contributors
# Last modified by David J Turner ([email protected]) 28/01/2025, 13:08. Copyright (c) The Contributors

import inspect
import pickle
Expand Down Expand Up @@ -1860,6 +1860,11 @@ def get_view(self, ax: Axes, x_lims: Quantity = None, log_scale: bool = True, pl
# Setting the axis limits
ax.set_xlim(x_lims)

# Making the scale log if requested
if log_scale:
ax.set_xscale("log")
ax.set_yscale("log")

# Setup the aesthetics of the axis
ax.minorticks_on()
ax.tick_params(axis='both', direction='in', which='both', top=True, right=True)
Expand Down Expand Up @@ -1925,11 +1930,6 @@ def get_view(self, ax: Axes, x_lims: Quantity = None, log_scale: bool = True, pl
# Setting the axis limits
ax.set_ylim(y_lims.value)

# Making the scale log if requested
if log_scale:
ax.set_xscale("log")
ax.set_yscale("log")

# I can dynamically grab the units in LaTeX formatting from the Quantity objects (thank you astropy)
# However I've noticed specific instances where the units can be made prettier
# Parsing the astropy units so that if they are double height then the square brackets will adjust size
Expand Down

0 comments on commit 8e4cfbc

Please sign in to comment.