Skip to content

Conversation

blink1073
Copy link
Collaborator

It made more sense to specify the resolution, since Matlab does not take a -SXX,YY argument in print.

I've added this option to the Metakernel %plot magic.

@blink1073
Copy link
Collaborator Author

Left to decide: how and where to set fmt and res. We could use pymat_set_variable to set variables like _plot_fmt and _plot_res, and use those in make_figs, or we could specify the arguments as part of the calls to pymat_eval and pymat_feval. What do you think @arokem?

@arokem
Copy link
Owner

arokem commented Feb 8, 2015

Thanks for looking into this.

Just to see that I understand the different proposals: do you propose to set global variables on the matlab side and use these to determine the format and resolution in make_figs? Should we consider having a _pymat_config struct array (or other object) to address this kind of issue more generally?

@blink1073
Copy link
Collaborator Author

I like the idea of a global config struct, shall I give it a shot?

@arokem
Copy link
Owner

arokem commented Feb 9, 2015

Yes - please do. The main thing that worries me (for now) is name-space
collisions with this variable. I might come up with other things later on.

On Sun, Feb 8, 2015 at 2:53 PM, Steven Silvester notifications@github.com
wrote:

I like the idea of a global config struct, shall I give it a shot?


Reply to this email directly or view it on GitHub
#128 (comment)
.

@blink1073
Copy link
Collaborator Author

We could put it in its own namespace. 


Sent from Mailbox

On Mon, Feb 9, 2015 at 3:53 PM, Ariel Rokem notifications@github.com
wrote:

Yes - please do. The main thing that worries me (for now) is name-space
collisions with this variable. I might come up with other things later on.
On Sun, Feb 8, 2015 at 2:53 PM, Steven Silvester notifications@github.com
wrote:

I like the idea of a global config struct, shall I give it a shot?


Reply to this email directly or view it on GitHub
#128 (comment)
.


Reply to this email directly or view it on GitHub:
#128 (comment)

@isbadawi
Copy link
Collaborator

If you mean package folders, I'm pretty sure Octave doesn't support those, unfortunately.

@blink1073
Copy link
Collaborator Author

Another alternative: we could leave the current make_figs alone and use defaultfigurepapersize, defaultfigureunits, and defaultfigurepaperunits to define a height and width (the default resolution is 150dpi).

@blink1073
Copy link
Collaborator Author

Heck I can do that right now with the current matlab_kernel.

@blink1073
Copy link
Collaborator Author

matlab_kernel 0.3 demonstrates this behaviour.

@arokem
Copy link
Owner

arokem commented Feb 11, 2015

Do you have an example notebook you could put up on nbviewer?

On Tue, Feb 10, 2015 at 6:54 PM, Steven Silvester notifications@github.com
wrote:

matlab_kernel 0.3 demonstrates this behaviour.


Reply to this email directly or view it on GitHub
#128 (comment)
.

@blink1073
Copy link
Collaborator Author

@arokem
Copy link
Owner

arokem commented Feb 13, 2015

That's fantastic! I particularly enjoy the %python magic :-)

Does this mean that we should close this PR, or is it still needed?

@blink1073
Copy link
Collaborator Author

Good call, I added a %%python magic example. I'd say close this one in favour of #134.

@arokem arokem closed this Feb 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants