<div dir="ltr">It's going to be really hard to know what your desired output is without a runnable script. Rather than reading from a file that only you have, it's better to hardcode some representative values for your arrays.<div><br></div><div>It looks like your trying to plot a time series. Matplotlib handles that pretty well without having to resort to using strings:</div><div><a href="http://matplotlib.org/examples/pylab_examples/date_demo_convert.html">http://matplotlib.org/examples/pylab_examples/date_demo_convert.html</a><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 24, 2017 at 5:11 PM, Jason Snyder <span dir="ltr"><<a href="mailto:jmssnyder@ucdavis.edu" target="_blank">jmssnyder@ucdavis.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br clear="all"><div dir="ltr"><div>I am trying to plot multiple plots where for the labels of the x axis I use strings.  I the below script in which I am attempting to do this.<br><br><br>       data = np.loadtxt(sys.argv[1], dtype='str',delimiter=',', skiprows=1,  usecols=(0,1,2,3,4,5))<br>       x = data[:,0]<br>       date = data[:,1]<br>       value1 = data[:,2]<br>       value2 = data[:,3]<br><br>       my_xticks = data[:,1]<br>       plt.xticks(x.astype(float), my_xticks)<br><br>       fig, (ax1,ax2) = plt.subplots(nrows=2)<br>       my_xticks = data[:,1]<br>       ax1.set_xticks(x.astype(float)<wbr>, my_xticks)    <br>       ax1=plt.plot(x, value1)<br>       plt.tick_params(axis='both',<wbr>which='major', labelsize=7)<br>       plt.title('Value1',fontsize=<wbr>10)<br>       plt.grid()<br><br>      ax2=plt.plot(x, value2)<br>      plt.tick_params(axis='both',<wbr>which='major', labelsize=7)<br>      plt.title('Value2',fontsize=<wbr>10)<br>      plt.grid()<br><br>What can I do to tweak this program to get desired results?<br><div><br></div></div></div>
</div>
<br>______________________________<wbr>_________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/matplotlib-<wbr>users</a><br>
<br></blockquote></div><br></div>