Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plotting axis scale error in ipmag.ani_depthplot() on example file #681

Open
Swanson-Hysell opened this issue Mar 1, 2023 · 0 comments
Open

Comments

@Swanson-Hysell
Copy link
Member

What command was run:

ipmag.ani_depthplot(dir_path='data_files/ani_depthplot')

What happened:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/var/folders/hb/m9qm0bdd13q_t59j9424w1n80000gn/T/ipykernel_74170/730097389.py in <module>
----> 1 ipmag.ani_depthplot(dir_path='data_files/ani_depthplot');

~/PmagPy/pmagpy/ipmag.py in ani_depthplot(spec_file, samp_file, meas_file, site_file, age_file, sum_file, fmt, dmin, dmax, depth_scale, dir_path, contribution)
   3393             Axs.append(ax6)
   3394             ax6.plot(Bulks, BulkDepths, 'bo')
-> 3395             ax6.axis([bmin - 1, 1.1 * bmax, dmax, dmin])
   3396             ax6.set_xlabel('Bulk Susc. (uSI)')
   3397             ax6.yaxis.set_major_locator(plt.NullLocator())

~/opt/anaconda3/envs/pmagpy_env/lib/python3.9/site-packages/matplotlib/axes/_base.py in axis(self, emit, *args, **kwargs)
   1926                      if ymin is None and ymax is None
   1927                      else False)
-> 1928             self.set_xlim(xmin, xmax, emit=emit, auto=xauto)
   1929             self.set_ylim(ymin, ymax, emit=emit, auto=yauto)
   1930         if kwargs:

~/opt/anaconda3/envs/pmagpy_env/lib/python3.9/site-packages/matplotlib/axes/_base.py in set_xlim(self, left, right, emit, auto, xmin, xmax)
   3520 
   3521         self._process_unit_info([("x", (left, right))], convert=False)
-> 3522         left = self._validate_converted_limits(left, self.convert_xunits)
   3523         right = self._validate_converted_limits(right, self.convert_xunits)
   3524 

~/opt/anaconda3/envs/pmagpy_env/lib/python3.9/site-packages/matplotlib/axes/_base.py in _validate_converted_limits(self, limit, convert)
   3437             if (isinstance(converted_limit, Real)
   3438                     and not np.isfinite(converted_limit)):
-> 3439                 raise ValueError("Axis limits cannot be NaN or Inf")
   3440             return converted_limit
   3441 

ValueError: Axis limits cannot be NaN or Inf

PmagPy version:

4.2.109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants