Some bug fixing in code#1
Conversation
…white data points on white background are not showing up
…ues are used as array indices
…clusters are assigned resulting in 'cl' array being full of -1 values which later cause an error on runtime.
|
Hello @CodingTumbleweed , I tried both Li's and yours code on windows 7 x64 Anaconda 5.1.0 Python3.6, and after it goes to dcplot.py, line 111: What reason do you think that might cause this? |
|
@Jackwzh . Hi Jack , Is the plot window not responding or does it crashes before even opening the plot window? |
|
not responding, but none of the three subfigures shows on the canvas |
…number, which results in sda[position] throwing IndexError: : only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices
|
@Jackwzh . Have you tried changing the default matplotlib Gui backend? I think it's Qt5 in your environment. It can be checked with %matplotlib command. Try running the code with TkAgg Backend i.e. |
|
@CodingTumbleweed It's the On Windows, if user do not give any input from the console, the figure won't plot anything and keep in not responding situation. After user inputs something from the console, figures will show on the canvas and everything goes well. But there is another problem. The while loop keeps asking inputs from console, so unless user input 'n', it will keep going in that way, and the figures will never show on the canvas. |
… only after it's provided will canvas show final plotted result. Removed the while loop and 'nID = input()' code and replaced it's functionality by providing 'Save' button on plot
|
@Jackwzh Thanks for pointing out the complete scenario. |
|
Hello all! @Jackwzh I still have no data displayed on the figure? I already replaced the code as you mentioned. Do I need to do anythong else? Thanks in advance!! |
|
@luisencalada you can try CodingTumbleweed 's repo, I believe this repo has solved most of the problems I've ever met. Without viewing your codes, I guess the cause of your problem might be the color of the scatter points is set to white, probably? If not so, you should post your codes or try the repo I mentioned above. :) |
Added Branch Author Name and Email
Hi Guipeng Li, while running your code, I encountered some bugs in code about array indices being decimal or negative values and fixed them. Below I have mentioned the Bugs encountered (in bold) and the reason for why they are being generated:
I have fixed these issues in my branch and was hoping that you could merge these changes into main branch.
Regards