PatrickT

Dr. Patrick T

2108 Reputation

18 Badges

16 years, 303 days

MaplePrimes Activity


These are replies submitted by PatrickT

I was initially confused about the SCR, as I thought it stood for "Senior Common Room," but okay now I get it.

Below is a copy of the SCR for (my) reference.

 

TITLE:
plot export functionality broken, Standard GUI, Maple 15 Windows

STEPS TO REPRODUCE:

Windows 7 is not listed as an OS, but that's my OS, in the 64bits variety.

MakePlot := proc(p::evaln)
  local name, opts:
    name := cat(convert(p,string),".ps"):
    opts := `color,landscape,noborder,transparent,width=512,height=320`:
  plotsetup('ps', 'plotoutput'=cat(name), 'plotoptions'=opts):
  print(plots:-display(eval(p),'axesfont'=[TIMES,10],'labelfont'=[TIMES,ROMAN,10])):
  plotsetup(default):
end proc:

MakePlot2 := proc(p::evaln)
  local name, opts:
    name := cat(convert(p,string),".ps"):
    opts := `color,landscape,noborder,transparent,width=512,height=320`:
  plotsetup('ps', 'plotoutput'=cat(name), 'plotoptions'=opts):
  print(plots:-display(eval(p),'axesfont'=[TIMES,10])):
  plotsetup(default):
end proc:

testPlot := plot( x^2, x = -1 .. 1, 'labels' = [horizontal,vertical],  'labeldirections' = [horizontal,vertical]) :
plots:-display(%);

MakePlot(testPlot);

MakePlot2(testPlot);

Related problem with 3D plots, only 2 labels out of 3 are exported.

In addition,

'plotoptions' = "width=512,height=320": doesn't work
'plotoptions' = "width=512pt,height=320pt": doesn't work
'plotoptions' = `width=512pt,height=320pt`: doesn't work
'plotoptions' = `width=512,height=320`: works

In addition, with the code below:

plot( cos(x), x = -2*Pi .. 2*Pi
  , 'axis' = [ 'tickmarks' = [10, 'color' = blue, 'thickness' = 3 ] ] );

the labels get colored in blue, which they shouldn't,

below, the labels remain in the default black color, as expected:

plot(cos(x), x = -2*Pi .. 2*Pi
  , 'axis' = [ 'gridlines' = [10, 'color' = blue, 'thickness' = 3 ] ] );


EXPECTED RESULT:

should be able to export plots properly, together with labels and options

In addition, note that the default plot width (inline) for a plot with legends is way too narrow.

ACTUAL RESULT:

Problem exporting labels.

 'labeldirections' = [horizontal,vertical]

displays properly inline, but the labels vanish when exported.

with plot3d, only 2 out of 3 labels are exported, irrespective of the option about labeldirections


ADDITIONAL INFORMATION:

problem of missing labels in 2D plots described here:

http://www.mapleprimes.com/questions/125991-Export-Plot-In-Standard-Gui-More-Problems

problem of the one missing label with 3D plot labels described here:

http://www.mapleprimes.com/questions/124671-Plotsetup-Versus-Mouse-Export-Inconsistencies

and related issues here:


http://www.mapleprimes.com/questions/125945-Plot-Size-On-Export-With-Maple-15

See also:

http://www.mapleprimes.com/posts/125899-Presized-Plots

http://www.mapleprimes.com/questions/123177-Exporting-3D-Plots-In-Maple-15

http://www.mapleprimes.com/posts/125952-Export-Plot-Driver-In-Standard

http://www.mapleprimes.com/questions/37133-Tickmarks--How-To-Set-Spacing-And-Thickness

I was initially confused about the SCR, as I thought it stood for "Senior Common Room," but okay now I get it.

Below is a copy of the SCR for (my) reference.

 

TITLE:
plot export functionality broken, Standard GUI, Maple 15 Windows

STEPS TO REPRODUCE:

Windows 7 is not listed as an OS, but that's my OS, in the 64bits variety.

MakePlot := proc(p::evaln)
  local name, opts:
    name := cat(convert(p,string),".ps"):
    opts := `color,landscape,noborder,transparent,width=512,height=320`:
  plotsetup('ps', 'plotoutput'=cat(name), 'plotoptions'=opts):
  print(plots:-display(eval(p),'axesfont'=[TIMES,10],'labelfont'=[TIMES,ROMAN,10])):
  plotsetup(default):
end proc:

MakePlot2 := proc(p::evaln)
  local name, opts:
    name := cat(convert(p,string),".ps"):
    opts := `color,landscape,noborder,transparent,width=512,height=320`:
  plotsetup('ps', 'plotoutput'=cat(name), 'plotoptions'=opts):
  print(plots:-display(eval(p),'axesfont'=[TIMES,10])):
  plotsetup(default):
end proc:

testPlot := plot( x^2, x = -1 .. 1, 'labels' = [horizontal,vertical],  'labeldirections' = [horizontal,vertical]) :
plots:-display(%);

MakePlot(testPlot);

MakePlot2(testPlot);

Related problem with 3D plots, only 2 labels out of 3 are exported.

In addition,

'plotoptions' = "width=512,height=320": doesn't work
'plotoptions' = "width=512pt,height=320pt": doesn't work
'plotoptions' = `width=512pt,height=320pt`: doesn't work
'plotoptions' = `width=512,height=320`: works

In addition, with the code below:

plot( cos(x), x = -2*Pi .. 2*Pi
  , 'axis' = [ 'tickmarks' = [10, 'color' = blue, 'thickness' = 3 ] ] );

the labels get colored in blue, which they shouldn't,

below, the labels remain in the default black color, as expected:

plot(cos(x), x = -2*Pi .. 2*Pi
  , 'axis' = [ 'gridlines' = [10, 'color' = blue, 'thickness' = 3 ] ] );


EXPECTED RESULT:

should be able to export plots properly, together with labels and options

In addition, note that the default plot width (inline) for a plot with legends is way too narrow.

ACTUAL RESULT:

Problem exporting labels.

 'labeldirections' = [horizontal,vertical]

displays properly inline, but the labels vanish when exported.

with plot3d, only 2 out of 3 labels are exported, irrespective of the option about labeldirections


ADDITIONAL INFORMATION:

problem of missing labels in 2D plots described here:

http://www.mapleprimes.com/questions/125991-Export-Plot-In-Standard-Gui-More-Problems

problem of the one missing label with 3D plot labels described here:

http://www.mapleprimes.com/questions/124671-Plotsetup-Versus-Mouse-Export-Inconsistencies

and related issues here:


http://www.mapleprimes.com/questions/125945-Plot-Size-On-Export-With-Maple-15

See also:

http://www.mapleprimes.com/posts/125899-Presized-Plots

http://www.mapleprimes.com/questions/123177-Exporting-3D-Plots-In-Maple-15

http://www.mapleprimes.com/posts/125952-Export-Plot-Driver-In-Standard

http://www.mapleprimes.com/questions/37133-Tickmarks--How-To-Set-Spacing-And-Thickness

I don't know what to do to submit an SCR. I would have thought that everytime the words "maple" and "bug" show up on the internet, an email warning is sent to Maplesoft for immediate action ?

Edit: I have found the link and am submitting an SCR now.

http://www.mapleprimes.com/scr/new

I don't know what to do to submit an SCR. I would have thought that everytime the words "maple" and "bug" show up on the internet, an email warning is sent to Maplesoft for immediate action ?

Edit: I have found the link and am submitting an SCR now.

http://www.mapleprimes.com/scr/new

@pagan 

oops, you're right, forgot to do that, no good mapling at 2:00am!

@pagan 

oops, you're right, forgot to do that, no good mapling at 2:00am!

 

So I won the jackpot, would you know it!

Thanks for these interesting clues acer. Indeed I was testing this on Maple 15.01 / Windows 7 - 64 bits.

Alejandro, the code below is what I tested.

And I can confirm the same behaviour reported by acer.

MakePlot := proc(p::evaln)
  local name, opts:
    name := cat(convert(p,string),".ps"):
    opts := `color,landscape,noborder,transparent,width=512,height=320`:
  plotsetup('ps', 'plotoutput'=cat(name), 'plotoptions'=opts):
  print(plots:-display(eval(p),'axesfont'=[TIMES,10],'labelfont'=[TIMES,ROMAN,10])):
  plotsetup(default):
end proc:

MakePlot2 := proc(p::evaln)
  local name, opts:
    name := cat(convert(p,string),".ps"):
    opts := `color,landscape,noborder,transparent,width=512,height=320`:
  plotsetup('ps', 'plotoutput'=cat(name), 'plotoptions'=opts):
  print(plots:-display(eval(p),'axesfont'=[TIMES,10])):
  plotsetup(default):
end proc:

testPlot := plot( x^2, x = -1 .. 1, 'labels' = [horizontal,vertical],  'labeldirections' = [horizontal,vertical]) :
plots:-display(%);

MakePlot(testPlot);

MakePlot2(testPlot);

 

So I won the jackpot, would you know it!

Thanks for these interesting clues acer. Indeed I was testing this on Maple 15.01 / Windows 7 - 64 bits.

Alejandro, the code below is what I tested.

And I can confirm the same behaviour reported by acer.

MakePlot := proc(p::evaln)
  local name, opts:
    name := cat(convert(p,string),".ps"):
    opts := `color,landscape,noborder,transparent,width=512,height=320`:
  plotsetup('ps', 'plotoutput'=cat(name), 'plotoptions'=opts):
  print(plots:-display(eval(p),'axesfont'=[TIMES,10],'labelfont'=[TIMES,ROMAN,10])):
  plotsetup(default):
end proc:

MakePlot2 := proc(p::evaln)
  local name, opts:
    name := cat(convert(p,string),".ps"):
    opts := `color,landscape,noborder,transparent,width=512,height=320`:
  plotsetup('ps', 'plotoutput'=cat(name), 'plotoptions'=opts):
  print(plots:-display(eval(p),'axesfont'=[TIMES,10])):
  plotsetup(default):
end proc:

testPlot := plot( x^2, x = -1 .. 1, 'labels' = [horizontal,vertical],  'labeldirections' = [horizontal,vertical]) :
plots:-display(%);

MakePlot(testPlot);

MakePlot2(testPlot);

It just occurred to me that since the tax system is often set up as (possibly several brackets of) constant tax rates, this provides the sort of "insured gamble" mechanism you describe... Likewise if company bonuses are specified in advance as fixed percentages of the employee's contribution to overall profit...

It just occurred to me that since the tax system is often set up as (possibly several brackets of) constant tax rates, this provides the sort of "insured gamble" mechanism you describe... Likewise if company bonuses are specified in advance as fixed percentages of the employee's contribution to overall profit...

@pagan 

I see, I hadn't understood what you were doing.

@pagan 

I see, I hadn't understood what you were doing.

if you want something with subscripts:

plot(sin(beta),beta=0..1,labels=[typeset(`#msubsup(mi("sigma"),mi("xi"))`), typeset(`#msubsup(mi("xi"),mi("A"))`)]);

if you want something with subscripts:

plot(sin(beta),beta=0..1,labels=[typeset(`#msubsup(mi("sigma"),mi("xi"))`), typeset(`#msubsup(mi("xi"),mi("A"))`)]);

@Alejandro Jakubi 

Obviously I do not know anything about the costs and benefits of this, but at a general level it would seem that fixing broken things should be a good return on investment whenever the broken thing has a close-to-zero return (for the user) while broken and the fix is not too expensive (to the developer).

Not being able to produce publishable figures with Maple very dramatically diminishes its usefulness to me.

I think there are two distinct issues here: 1) fixing/debugging 2D plots in standard gui and 2) upgrading/rewriting 3D plots. There is no state of the world I can think of where 1) would not be a top priority. As for 2) that depends on how many users need 3D plots and how difficult it is to add a z-axis to the 2D code. If 2) is not a good return on investment, fair enough. But 1) must be the best deal out there right now for Maplesoft!

In addition, there are dynamic effects: the problems I've had with producing good-looking plots have induced me to use other software for that. I produce the bulk of my plots directly in LaTeX now. It was a costly move, but now I have a system and it's reasonably efficient. I am also doing more and more of my plots with python-based (and freeware) software, while I can free-ride on my co-authors' programming abilities to help me fix problems. What's keeping me with Maple is that I know how to do certain things with it that I would need to learn to do with other softs. If the plots drivers/codes remain broken long enough, I will eventually have learned to do things with other softs. And what would keep me using Maple? There's nothing I do that I couldn't do with Matlab, Mathematica or the freeware softs out there like scipy, numpy, matplotlib, mayavi, etc.. If I do it with Maple it's because it's more productive for me that way. And all that because my university had Maple and not Mathematica way back when I was a student, so I learned the former not the latter.

I'll say one more thing, the maple user community is my single biggest reason for sticking with it. Getting help from you Alejandro and all the other guys, that's why I stay. This forum remains a great source of inspiration for me.

The disatisfaction with Maple plots is a little paradoxical in this: if Maple were wholly unable to produce any plots of any kinds, I would expect to have to use another soft for that. It would be a little inconvenient and inefficient, but it would be the only way. However, having some plotting functionalities immediately brings needs and frustrations.

My dad says "whatever you do, do it right, even if it's cleaning a toilet." The principle is sound.(FOOTNOTE) The 2D-Standard plot export facility should be fixed, must be fixed, will be fixed ... or not?

EDIT: (FOOTNOTE) By this colorful image, I mean that if one signs up for a job, one ought to do it right, even if it isn't the most exciting job. Ensuring that the inline/export plot drivers work properly, fixing them, testing them with every upgrade, etc. may not be as exciting as developing a new package or module or whatever, but it is, in a sense, part of an implicit contract with customers. If Maple is supposed to be able to create and export plots, it ought to be such as to be satisfactory to most users, from version to version.

First 36 37 38 39 40 41 42 Last Page 38 of 93