First, install the relevant software
- Install VirtualBox in Windows;
- Install Ubuntu Server in VirtualBox;
- Installing Cifs-utils:sudo apt-get Install cifs-utils in Ubuntu server;
- Installing Octave:sudo apt-get Install octave transfig epstool in Ubuntu server.
Second, create a shared directory between Windows and Ubuntu server
- Share a share folder in Windows, network permissions and directories are all set to everyone & Full control;
- Create a mapping directory in Ubuntu server: Sudu mkdir/mnt/share;
- mount a network drive in Ubuntu server: sudo mount-t cifs//host Ip/share/mnt/share-o username= host user name;
- Create a shortcut link in the/home directory in Ubuntu server: Ln-s/mnt/share/~/share/.
Third, drawing
- Write Matlab drawing code files in Windows, and put them in a shared folder, such as file test.m;
- In the drawing code, the following plot statement prints the image to a file: Print-dpng myfig.png;
- Switch to the shared directory in Ubuntu server: CD ~/share;
- Running Octave:sudo octave-q test.m in silent mode;
- In Windows you can see that there is a myfig.png in the shared directory, which is the function image.
A test routine:
0:p i/:2*pi;y = Tan;p lot (x, y);p rint-dpng xab.png;
Change Console resolution method:
Edit configuration file, execute command: sudo vi/etc/default/grub
grub_gfxmode=1024x768x24
grub_cmdline_linux_default= "Splash xvga=1024x768x24 consoleblank=0"
# Splash: Display the graphics screen when powering on and off
# xvga=1024x768x24: Screen resolution and color depth
# consoleblank=0: Disable screensaver
Execute command after Save: sudo update-grub2
Methods for drawing mathematical function images under windows