"Matlab-like" plotting library

Issue 1521: contour doesnot work

Reported by Tianzhu Qiao, Jan 5, 2015

Steps to reproduce the problem:
1. install 0.46
2. run the contour demo from scilab help
   t=linspace(-%pi,%pi,30);
   function z=my_surface(x, y),z=x*sin(x)^2*cos(y),endfunction
   contour(t,t,my_surface,10)

Expected result: 
show the contour figure

Actual result:
contour(t,t,my_surface,10)
 !--error 202 
unglue: Wrong type for input argument #1: Handle matrix expected.
at line     160 of function contour2d called by :  
at line      93 of function contour called by :  
contour(t,t,my_surface,10)

I think the problem is gca()/gcf()(since it is different from the 
default scilab ones). If I change the gca & gcf to _gca & 
_gcf. The above code runs fine. Thanks! 

Best Regards
Tianzhu Qiao

Comment 1 by Alberto Monetti, Sep 14, 2015

Dear Tianzhu

I have the same problem of you. What do you mean with "change 
the gca & gcf to _gca & _gcf"?

Alberto

Comment 2 by Tianzhu Qiao, Sep 23, 2015

Dear Alberto,

I think the problem is that plotlib overwrites the default 
gca()/gcf() functions, and returns different handlers than the 
original functions. Thus, contour gets confused. 

I rename the gca()/gcf() in plotlib to _gca()/_gcf(), and rebuild 
the plotlib (update buildmacros.sce accordingly). It seems that it 
works fine now.

Best Regards,
Tianzhu Qiao

Comment 3 by Lexie Kings, Feb 21, 2017

seems like i ran into the same issue but my system is ubuntu while 
my colleague uses windows and everything runs smoothly though all 
the steps we did were the same since the task from 
http://essay.expert/ was the same..so do you think that the problem 
lies within OS??

Comment 4 by sambhav garg, Aug 4, 2017

sometime i am also see the same problem but 
http://allformtemplate.livejournal.com/1194.html already solve 
itself after some time.

Created: 2 years 11 months ago by Tianzhu Qiao

Updated: 4 months 11 days ago

Status: New

Followed by: 3 persons

Labels:
Priority:Medium
Type:Defect