CSV read-in data, imported into Word with julia/matplotlib/pyplot vector drawing

Source: Internet
Author: User

This is to use Julia to achieve the drawing, Julia has three drawing libraries: Winston, Gadfly, Pyplot

Here is pyplot, in fact he is based on matplotlib

1, first installed in the Juno two libraries

Juno is Julia's Integrated Open Environment (IDE)

If you do not have Juno installed, see here: http://blog.csdn.net/fuzimango/article/details/47721055

Install both libraries in Juno: the direct ctrl+enter operation becomes

Pkg.add ("Dataframes") #表格库, this seems to be loaded with Juno when the Pkg.add ("Pyplot") #绘图库

2, then write a CSV file as read data, casually to the point of what to say ~ ~ ~

Note that the first line does not fill in the data, Julia will default to the table header

3, then the code:

Using Dataframesdf=readtable ("E:\\360downloads\\zou\\julia\\cal.csv") using Pyplotfig,ax=subplots () x=df[1]for I in 2:5  y=df[i]  ax[:p lot] (x,y,linewidth=2,alpha=0.6) End

That's right! That's all the code! You can see how easy it is for Julia to draw.

CTRL + A All select Ctrl+enter run, the following the goods jumped out.

4, after the picture can see the effect, click Save SVG format

5. Convert to EMF format

Since matplotlib does not support EMF format output after such a version. Another software is needed here to convert the format, this is a very powerful open source software!

You can download the Inkscape:https://inkscape.org/en/gallery/item/3956/inkscape-0.91-x64.msi here

Save as EMF format immediately after installation ~

6. Import Word

Insert Picture, select your EMF picture

Did you see it?!! I zoom in 5 times times, the text in the picture is clearly visible (nonsense, because it is a vector map, a little brain ~)

It may be more intuitive to compare with the text.

Many do not say, enjoy bar ~ ~ ~

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

CSV read-in data, imported into Word with julia/matplotlib/pyplot vector drawing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.