[sage-support] **legend

2018-01-22 Thread Henri Girard

Hi,

I have params=dict() which works well, I am trying to look the same way 
with lgd= ? like lgd=dict...something ?


I didn't find answer

This way works but I have to put a variable (q, here) but when I change 
it can change too ?


q.set_legend_options(loc=2,font_size=6,shadow=False,
 back_color="lightcyan")

show(q,**params)

If there is way ? Bienvenu :)

Regards

Henri


--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Piecewise plot not smooth in png

2018-01-22 Thread Simon Willerton


On Monday, January 22, 2018 at 12:07:07 AM UTC, Simon Willerton wrote:
>
>
> On Sunday, January 21, 2018 at 7:02:24 PM UTC, William wrote:
>>
>>
>> On Sun, Jan 21, 2018 at 9:01 AM Simon Willerton  
>> wrote:
>>
>>> Hi!
>>>
>>> There seems to be a bug in the plotting in the Jupyter notebook.  The 
>>> following piecewise defined function should be smooth at r=1 but the plot 
>>> is not; the first part of the plot seems to be lifted slightly.  I noticed 
>>> this in a more complicated example but this is a reasonably minimal case.
>>>
>>> r = var('r')
>>> plot(2*r - r^2, r, 0, 1) + plot(1, r, 1, 2)
>>>
>>> This bug doesn't seem to occur in CoCalc .sagews notebook but does occur 
>>> in SageMath Kernels 7.6, 8.0, 8.1 in a CoCalc Jupyter notebook and offline 
>>> on my Mac OS X Sierra in a Jupyter notebook.
>>>
>>
>> It could be an issue with svg versus png output.
>>
>>
>>>
>>> Cheers,
>>>
>>> Simon.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "sage-support" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to sage-support...@googlegroups.com.
>>> To post to this group, send email to sage-s...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/sage-support.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> -- 
>> -- William Stein
>>
>
> Indeed, that seems to be the problem.  Comparing the output from the 
> following code gives the svg as smooth but the png not smooth.
>
> p = plot(2*r- r^2, r, 0,1) + plot(1, r, 1, 2)
> p.save("plot.svg")
> p.save("plot.png")
>  
>

Following William's hint, I came up with a workaround.  The first solution 
I found at https://stackoverflow.com/a/45664729 didn't work on .sagews 
files, so combining that with https://stackoverflow.com/a/44100805, 
 I ended up with the following.  Do 
tell me if there's a better way!


from IPython.display import SVG, display

def svg_show(pic, *args, **kwds):
"""
Display the plot 'pic' using svg (rather than png).  If we are in 
Jupyter (ie. IPython)
we need to do this explicitly.  Otherwise we can use the default show() 
function.
"""
try:
get_ipython
pic.save('temp.svg', *args, **kwds)
display(SVG(filename='temp.svg'))
except:
show(pic, *args, **kwds)


r = var('r') 
svg_show(plot(2*r- r^2, r, 0,1) + plot(1, r, 1, 2), ymin=0.5)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] duplicate legend

2018-01-22 Thread Henri Girard

Hi,

After looking in few old tickets, I can't correct the duplicate legend ?

c=3e8;h=6.626*(10^-34);k = 1.281*(10^-23)
k1=8*pi*h*c;k2=(h*c)/k
E(l,T)=k1*(l*1e-9)^-5*(1/(exp(k2/((l*1e-9)*T))-1))
f1=0;f2=E(l,3500);f3=E(l,4000);f4=E(l,4500);
params=dict(figsize=3,axes=False,fontsize=6,
    frame=True,gridlines="major",
    gridlinesstyle=dict(color="lightgrey",
    linestyle="-"),
    axes_labels=("$\Lambda[nm]$",\
 "$E(\\Lambda)[KJ/nm$"),
    legend_font_size=6)
f1=0;f2=E(l,3500);f3=E(l,4000);f4=E(l,4500)
b=plot([f2,f3],l,10,4000,legend_label="4000",
   fill =[0, [0]],
  fillcolor=['blue','green'],
  fillalpha=1)
p=plot([f1,f2],l,10,4000,legend_label="3000",
   fill={1: [0]},
   fillcolor=["red","yellow"],
   fillalpha=1)
d=plot([f3,f4],l,10,4000,legend_label="5000",
   fill =[1, [0]],
   fillcolor=['yellow','red'],
   fillalpha=0.5)
v=plot(p+b+d)
v.show(**params)

Any help ?

Regards

Henri

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: duplicate legend

2018-01-22 Thread Henri Girard
Two years ago I made this pic in a texmacs sage session, but 
unfortunatly sage doesn't work anymore with texmacs, I am reproducing it 
but I have the legend problem, otherwise I think it should be even nicer 
with new sage 8 xx .


Thanks for any help :)

Henri


Le 22/01/2018 à 14:57, Henri Girard a écrit :

Hi,

After looking in few old tickets, I can't correct the duplicate legend ?

c=3e8;h=6.626*(10^-34);k = 1.281*(10^-23)
k1=8*pi*h*c;k2=(h*c)/k
E(l,T)=k1*(l*1e-9)^-5*(1/(exp(k2/((l*1e-9)*T))-1))
f1=0;f2=E(l,3500);f3=E(l,4000);f4=E(l,4500);
params=dict(figsize=3,axes=False,fontsize=6,
    frame=True,gridlines="major",
    gridlinesstyle=dict(color="lightgrey",
    linestyle="-"),
    axes_labels=("$\Lambda[nm]$",\
 "$E(\\Lambda)[KJ/nm$"),
    legend_font_size=6)
f1=0;f2=E(l,3500);f3=E(l,4000);f4=E(l,4500)
b=plot([f2,f3],l,10,4000,legend_label="4000",
   fill =[0, [0]],
  fillcolor=['blue','green'],
  fillalpha=1)
p=plot([f1,f2],l,10,4000,legend_label="3000",
   fill={1: [0]},
   fillcolor=["red","yellow"],
   fillalpha=1)
d=plot([f3,f4],l,10,4000,legend_label="5000",
   fill =[1, [0]],
   fillcolor=['yellow','red'],
   fillalpha=0.5)
v=plot(p+b+d)
v.show(**params)

Any help ?

Regards

Henri



--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] SageMath 8.1 Native for Windows

2018-01-22 Thread Murat Arpat
Hello,

I've installed SageMath 8.1 on OS X El Capitan 10.11.6 and Fedora 
Workstation 27, both works fine. Then, I've tried to install it on Windows 
10 using native installer binary, however, after a successful installation 
it does not load giving the error on attached screenshot.

Any ideas/solution to this problem?

Regards.

System Specs
-
i5-2410 / 8GB RAM / 256GB SSD / Windows 10 Pro x64

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: duplicate legend

2018-01-22 Thread Emmanuel Charpentier
I must be stupid : I can't see the problem... Could ypou amplify ?

--
Emmanuel Charpentier

Le lundi 22 janvier 2018 14:57:34 UTC+1, HG a écrit :
>
> Hi, 
>
> After looking in few old tickets, I can't correct the duplicate legend ? 
>
> c=3e8;h=6.626*(10^-34);k = 1.281*(10^-23) 
> k1=8*pi*h*c;k2=(h*c)/k 
> E(l,T)=k1*(l*1e-9)^-5*(1/(exp(k2/((l*1e-9)*T))-1)) 
> f1=0;f2=E(l,3500);f3=E(l,4000);f4=E(l,4500); 
> params=dict(figsize=3,axes=False,fontsize=6, 
>  frame=True,gridlines="major", 
>  gridlinesstyle=dict(color="lightgrey", 
>  linestyle="-"), 
>  axes_labels=("$\Lambda[nm]$",\ 
>   "$E(\\Lambda)[KJ/nm$"), 
>  legend_font_size=6) 
> f1=0;f2=E(l,3500);f3=E(l,4000);f4=E(l,4500) 
> b=plot([f2,f3],l,10,4000,legend_label="4000", 
> fill =[0, [0]], 
>fillcolor=['blue','green'], 
>fillalpha=1) 
> p=plot([f1,f2],l,10,4000,legend_label="3000", 
> fill={1: [0]}, 
> fillcolor=["red","yellow"], 
> fillalpha=1) 
> d=plot([f3,f4],l,10,4000,legend_label="5000", 
> fill =[1, [0]], 
> fillcolor=['yellow','red'], 
> fillalpha=0.5) 
> v=plot(p+b+d) 
> v.show(**params) 
>
> Any help ? 
>
> Regards 
>
> Henri 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: duplicate legend

2018-01-22 Thread HG


Le lundi 22 janvier 2018 14:57:34 UTC+1, HG a écrit :
>
> Hi, 
>
> After looking in few old tickets, I can't correct the duplicate legend ? 
>
> c=3e8;h=6.626*(10^-34);k = 1.281*(10^-23) 
> k1=8*pi*h*c;k2=(h*c)/k 
> E(l,T)=k1*(l*1e-9)^-5*(1/(exp(k2/((l*1e-9)*T))-1)) 
> f1=0;f2=E(l,3500);f3=E(l,4000);f4=E(l,4500); 
> params=dict(figsize=3,axes=False,fontsize=6, 
>  frame=True,gridlines="major", 
>  gridlinesstyle=dict(color="lightgrey", 
>  linestyle="-"), 
>  axes_labels=("$\Lambda[nm]$",\ 
>   "$E(\\Lambda)[KJ/nm$"), 
>  legend_font_size=6) 
> f1=0;f2=E(l,3500);f3=E(l,4000);f4=E(l,4500) 
> b=plot([f2,f3],l,10,4000,legend_label="4000", 
> fill =[0, [0]], 
>fillcolor=['blue','green'], 
>fillalpha=1) 
> p=plot([f1,f2],l,10,4000,legend_label="3000", 
> fill={1: [0]}, 
> fillcolor=["red","yellow"], 
> fillalpha=1) 
> d=plot([f3,f4],l,10,4000,legend_label="5000", 
> fill =[1, [0]], 
> fillcolor=['yellow','red'], 
> fillalpha=0.5) 
> v=plot(p+b+d) 
> v.show(**params) 
>
> Any help ? 
>
> Regards 
>
> Henri 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: duplicate legend

2018-01-22 Thread Henri Girard
I found the problem it's because I use to put two functions (f1,f2only 
one needed f2) apparently it works but I have to correct my graphs.



Le 22/01/2018 à 21:59, HG a écrit :



Le lundi 22 janvier 2018 14:57:34 UTC+1, HG a écrit :

Hi,

After looking in few old tickets, I can't correct the duplicate
legend ?

c=3e8;h=6.626*(10^-34);k = 1.281*(10^-23)
k1=8*pi*h*c;k2=(h*c)/k
E(l,T)=k1*(l*1e-9)^-5*(1/(exp(k2/((l*1e-9)*T))-1))
f1=0;f2=E(l,3500);f3=E(l,4000);f4=E(l,4500);
params=dict(figsize=3,axes=False,fontsize=6,
 frame=True,gridlines="major",
 gridlinesstyle=dict(color="lightgrey",
   linestyle="-"),
 axes_labels=("$\Lambda[nm]$",\
  "$E(\\Lambda)[KJ/nm$"),
 legend_font_size=6)
f1=0;f2=E(l,3500);f3=E(l,4000);f4=E(l,4500)
b=plot([f2,f3],l,10,4000,legend_label="4000",
    fill =[0, [0]],
   fillcolor=['blue','green'],
   fillalpha=1)
p=plot([f1,f2],l,10,4000,legend_label="3000",
    fill={1: [0]},
    fillcolor=["red","yellow"],
    fillalpha=1)
d=plot([f3,f4],l,10,4000,legend_label="5000",
    fill =[1, [0]],
    fillcolor=['yellow','red'],
    fillalpha=0.5)
v=plot(p+b+d)
v.show(**params)

Any help ?

Regards

Henri

--
You received this message because you are subscribed to the Google 
Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to sage-support+unsubscr...@googlegroups.com 
.
To post to this group, send email to sage-support@googlegroups.com 
.

Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.