<div dir="ltr">Great, thanks for the reply. I tried the NaN solution during my tinkering but thought I should somehow be getting away without having to recreate the axes in the same dimensions, since it's not required when using integers. Just making sure I wasn't missing anything more obvious</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 14, 2019 at 12:29 AM Jody Klymak <<a href="mailto:jklymak@uvic.ca">jklymak@uvic.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><br><div><br><blockquote type="cite"><div>On Mar 13, 2019, at  21:40 PM, AJ M <<a href="mailto:ajm8671@gmail.com" target="_blank">ajm8671@gmail.com</a>> wrote:</div><br class="gmail-m_-2372631332642295926Apple-interchange-newline"><div><span style="font-family:LucidaSans-Typewriter;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">The only conclusion I can come to is that matplotlib treats these values differently, and converts the text arrays to integers under the hood without trying to align them.</span></div></blockquote></div><br><div>Thats basically correct to my understanding - the twin axes is a new axes that shares it’s xlimits with the old one, but we don’t have any way of passing “categories” from one axes to the next, so it carries its own list of category->integer conversion that gets made anew when you call scatter.  The first axes is the one that gets the tick labels.  </div><div><br></div><div>You *may* be able to pass the converter to the second axes, but I’m not sure.  </div><div><br></div><div>Easier would be to just do the following:</div><div><br></div><div>```python</div><div><br></div><div><div>import matplotlib.pyplot as plt</div><div>import numpy as np</div><div><br></div><div>y1 = [5, np.NaN, 6, np.NaN, 15]</div><div>y2 = [100, 200, 300, 400, 500]</div><div><br></div><div>x = ['apples','carrots','bananas','watermelon','cheerios']</div><div><br></div><div>fig, ax = plt.subplots()</div><div>ax.scatter(x, y2)</div><div>ax2 = ax.twinx()</div><div>ax2.scatter(x, y1, color = "orange")</div><div>plt.show()</div></div><div>```</div><div><br></div><div>Cheers, Jody</div></div></blockquote></div>