[Matplotlib-users] Matplotlib - why scatter plot markers are stretched?
Thomas Caswell
tcaswell at gmail.com
Thu Jul 19 16:56:05 EDT 2018
What is the data type of the the index?
Can you give us a copy-pasteble example (if we change your example to fill
in the missing variables we may miss a key detail and not be able to
reproduce the issue). Generating random data is usually a good approach
here.
On Thu, Jul 19, 2018 at 10:33 AM Gopi1616 <gopisiva1616 at gmail.com> wrote:
> I was creating scatter plot using matplotlib with python2.7 script and it
> worked totally fine. I then upgraded my python script from python2.7 to 3.6
> now and the markers in the plot are stretched, not sure why this is
> happening. Please help me with this.
> <http://matplotlib.1069221.n5.nabble.com/file/t5171/comparison.png>
>
> Data:
> table1.index freq_table1['VarFreq']
> 1 0.2
> 2 0.4
> 3 0.7
> 4 1.0
>
> Code:
> fig = plt.figure(figsize=(20,16))
> ax1 = fig.add_subplot(1,1,1)
> ax1.scatter(table1.index, table1['VarFreq'], color='r',
> label=VCF1_legend,
> marker="*")
> ax1.scatter(table2.index, table2['VarFreq'], color='blue',
> label=VCF2_legend, marker="+")
> plt.legend(loc='upper right')
> ax1.set_title('VarFreq correlation, fontsize=20)
> plt.savefig('WESPP_frequency_comparison.png', dpi=600 )
>
>
>
> --
> Sent from:
> http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
--
Thomas Caswell
tcaswell at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20180719/c613decb/attachment.html>
More information about the Matplotlib-users
mailing list