shakedzy / dython

A set of data tools in Python
http://shakedzy.xyz/dython/
MIT License
496 stars 102 forks source link

plt.subplot eopt markers are plotted in wrong axis #64

Closed matthiaswalle-eth closed 4 years ago

matthiaswalle-eth commented 4 years ago

Version check:

Run and copy the output: Python 3.8.6 (default, Sep 25 2020, 00:00:00) [GCC 10.2.1 20200723 (Red Hat 10.2.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information.

import sys, dython print(sys.version_info) sys.version_info(major=3, minor=8, micro=6, releaselevel='final', serial=0) print(dython.version) 0.6.1

Describe the bug:

Code to reproduce:

import dython
fig, axs = plt.subplots(ncols=2, nrows=2,figsize=(fig_height,sub_fig_width))
results = roc_graph(y_test, y_pred, class_names=class_names**,ax=axs[0,1],eopt=True**,plot=True,colors=p)

Error message:

[ WARNING ] - No handles with labels found to put in legend.

Error message:

your error message

eopt is plotted in last subplot (axs[1.1]) No legend is plotted

Input data:

shakedzy commented 4 years ago

Hi, can you please supply the data you use? what are y_test, y_pred, 'class_namesandp`?

Also, what do you set eopt as True**? True is not a dict. Same for class_names - it's suppose to be a list, not a dict..