bugGNU Octave - Bugs: bug #58622, "print -dmeta" should...

 
 

bug #58622: "print -dmeta" should send output to clipboard

Submitted by:  None
Submitted on:  Fri 19 Jun 2020 09:05:03 AM UTC  
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  5.2.0
Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Sun 21 Jun 2020 10:09:43 PM UTC, comment #7: 

@OP:

>> Please let me know how should I modify the code to make this function working?


This is typically a question you can ask on the help mailing list (help@octave.org). You'll get more audience and more Windows users who can help you if you really want to pursue this activex approach.

From your script I understand that, in absence of a file name and given a suitable device (meta, pdf and bitmap I guess [1]) Matlab sends the output to the clipboard, as if the -clipboard option had been passed.

Unfortunately the -clipboard option is not implemented, and you won't be able to use this copy-paste approach from Octave.

I'll update the title to make it a feature request for the -clipboard option.

[1] https://www.mathworks.com/help/matlab/ref/print.html#bukyb6e-1-clipboardformat

Pantxo Diribarne <pantxo>
Project Member
Sat 20 Jun 2020 01:47:29 AM UTC, comment #6: 

i try to exporting a plot/figure to excel

I used the code from the link added below.

https://kr.mathworks.com/matlabcentral/fileexchange/23239-exporting-a-matlab-plot-figure-to-excel

and i was fixed the code like atteched file
( file #49325:  PlotInExcel.m )

Please let me know how should I modify the code to make this function working?

still error

error: print: format must be a valid Ghostscript format for spooling to a printer
error: called from
    print_parse_opts at line 421 column 7
    print at line 416 column 8

Anonymous
Fri 19 Jun 2020 08:17:27 PM UTC, comment #5: 

My problem was due to missing fig2dev. Now, depending on which version of pstoedit I have  I get different errors.

It looks like we have our annual emf bugfest.

May be we should depreciate emf format and direct people to use
 other formats (e.g. svg) and external programs (e.g. inkscape?) to convert to emf, if they really need it.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Fri 19 Jun 2020 08:07:18 PM UTC, comment #4: 

No, doesn't work here either. I think emf has been fixed and magically broken twice since Octave 5.2. Looks like it depends on which versions of pstoedit is combined to what version ghostscript, but this should be the subject of another report.

Pantxo Diribarne <pantxo>
Project Member
Fri 19 Jun 2020 04:35:52 PM UTC, comment #3: 

Pantxo,

Does


plot(1:10)
print "t1.emf"

work for you? I do not get any warnings/errors, but the t1.emf is
garbage -- contains only:

cat t1.emf
The driver for the selected format cannot write to standard output because it writes binary data

(this is with recent 6.0.1)

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Fri 19 Jun 2020 01:16:14 PM UTC, comment #2: 
Pantxo Diribarne <pantxo>
Project Member
Fri 19 Jun 2020 01:13:58 PM UTC, comment #1: 

Thanks for your report. You did not provide a file name so the print function assumes you want to send the figure to a printer (this is explained early in "help print"). In that case you should use either -dps or -dpdf (if your printer supports pdf) or specific Ghostscript formats designed for printers (see e.g. [1]), hence the cryptic error message.

Can I close this report or do you think the doc or the error message could be more clear?

Pantxo Diribarne <pantxo>
Project Member
Fri 19 Jun 2020 09:05:03 AM UTC, original submission:  

figure()
plot(x,y)
grid on
print -dmeta

error: print: format must be a valid Ghostscript format for spooling to a printer
error: called from
    _print_parse_opts_ at line 421 column 7
    print at line 416 column 8

how to do can i fix it ?

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #49325:  PlotInExcel.m added by None (1KiB - application/octet-stream - i try to exporting a plot/figure to excel)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-06-21 pantxo CategoryOctave Function => Plotting
        Item GroupDocumentation => Feature Request
        StatusNeed Info => Confirmed
        Summaryerror of print -dmeta => "print -dmeta" should send output to clipboard
    2020-06-20 None Attached File- => Added PlotInExcel.m, #49325
    2020-06-19 pantxo Item GroupUnexpected Error => Documentation
        StatusNone => Need Info
        Operating SystemMicrosoft Windows => Any

    Back to the top


    Powered by Savane 3.5