gtkfi / ArcSDM

Spatial Data Modeler 6 for ArcGIS Pro
32 stars 18 forks source link

Fixed matplotlib legend problem in roctool.py #166

Open kkorhone opened 7 months ago

kkorhone commented 7 months ago

This fix removes the last positional argument from the call to legend() on line 98 of roctool.py because there is no version of legend() that takes 3 positional arguments.

To test the bug fix using _MPM_Demo.gdb_ from demodata:

  1. Add _MPM_Demo.gdb/VectorData/Orogenic_Au and MPM_Demo.gdb/em_app_res_ to the current map
  2. Open the Calculate ROC Curves and AUC Values tool
  3. Set True Positives to _Orogenic_Au_
  4. Add _em_app_res to Classification Models_
  5. Write C:\Temp to Destination Folder
  6. Click Run
  7. Observe the files results.dbf and results.png in C:\Temp
lehtonenp commented 7 months ago

@kkorhone, I need to require information on how to test your changes. I am talking in terms of which tool in the toolbox needs to be tested, and where the tool is located. I also need information about what data I can use as input and what parameters to use as input to the function that is tested.

I found from matplotlib that pylab's use is discouraged. Now, I am not forcing you to refactor the code right away but I encourage you to think from a broader perspective, considering the long-term life cycle of ArcSDM.

lehtonenp commented 6 months ago

@kkorhone, I thought that as this is your first pull request, we could practice pull request etiquette. How does that sound?

I know this is a small change to the code base. Hence, this would be a good opportunity to practice before larger pull requests.

I linked an issue to this pull request which is fixed by this PR.