0

I want to export a figure with text rotate to a editable document, including text, in adobe illustrator.

enter image description here

In some question give a solution to text not rotate and in axis:

How can I export a matplotlib figure as a vector graphic with editable text fields?

http://jonathansoma.com/lede/data-studio/matplotlib/exporting-from-matplotlib-to-open-in-adobe-illustrator/

My code is:

import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.patheffects as pe


mpl.rcParams['pdf.fonttype'] = 42
mpl.rcParams['ps.fonttype'] = 42
mpl.rcParams['svg.fonttype'] = 'none'

x=[0,0,1, 2,  3, 4, 5, 6, 7, 8, 9, 10,11,12,13,13]
y=[0,4,1, 8, 12, 6, 7, 4, 4, 1, 8, 12, 6, 7, 4, 0] 

plt.xlim(right=max(x)) #xmax is your value
plt.xlim(left=0) #xmin is your value
plt.ylim(top=max(y)) #ymax is your value
plt.ylim(bottom=0) #ymin is your value

plt.plot(x,y)
plt.text(0.5, 12, 'Rotate text', va='top',ha='right', rotation=90,zorder=20, wrap=True,size=10,color='g',path_effects=[pe.withStroke(linewidth=5, foreground='w')])

plt.savefig("test.eps")

plt.savefig('test.pdf')

plt.savefig('test.svg')


plt.show()

plt.clf()
RBenet
  • 171
  • 1
  • 10
  • put.savefig('filename.eps', format='eps') EPS Couldn't the format be edited in illustrator? – r-beginners Jul 05 '20 at 13:09
  • Yes EPS format is editable in Illustrator, but text of figure is not editable. And in PDF format you can edit text in axis, but not if it is rotate. – RBenet Jul 05 '20 at 13:34

0 Answers0