Function view()

74 views
Skip to first unread message

Matheus Bernardino

unread,
Apr 22, 2017, 8:26:36 AM4/22/17
to scikit-fuzzy
Hello there,

I have started an implementation of a fuzzy controller for a satellite's instrument using the scikit-fuzzy.
In order to confirme if I have the good insight about the membership functions - i.e. if I got the right idea about how to organize the variables - it would be great to be able to see the membership degrees graphic.
Through the scikit-fuzzy's docs, I realized that we already have a function view() that could help me with my needs. However, the graphic closes too fast at the end of the execution.

If I was handling a simple plt.show() - from matplotlib - it would be enough changing the parameter 'block' of the funcion show ( show(block=True) ), what would keep the image displayed.
In this context, I'd like to know how you guys handle this issue. How do you keep the graphics displayed?

Thank you very much for your attention and for your support.

Sincerely,
Matheus Bernardino

Josh Warner

unread,
Apr 22, 2017, 1:51:52 PM4/22/17
to Matheus Bernardino, scikit-fuzzy
Hi Matheus,

The 'view' function at present directly returns the matplotlib plot objects.  When developing with the Jupyter notebook, the resulting figure is indeed persistent.  In other environments, it may indeed be transient.  This sounds like your experience.

It was designed this way so users can directly access the figure and customize it further if desired.

I should mention that when looking into this, I found that one of the view methods only returned the figure object, not both figure and axis.  This is now fixed.  So if you are about to write some code, I'll push a minor point release shortly which includes this fix which has more consistent behavior looking forward.

Regards,
Josh
Reply all
Reply to author
Forward
0 new messages