472,371 Members | 1,587 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,371 software developers and data experts.

dislin titlin and string decode

Hello!

I have an unespectedn result with dislin titlin

dislin.metafl ('WMF')
dislin.disini ()

.....
a="Andrés or Ramón"
dislin.titlin (a.encode("Latin-1"), 1)
# not error raised, is ok
.....

dislin.disfin ()
In the output file all is ok but the title is

Andr s or Ram n

Thanks in advance!

May 19 '07 #1
3 2135
the code is:

#!/usr/bin/env python

def try_dislin():
....import dislin
....dislin.metafl ('WMF')
....dislin.errdev ('FILE')
....dislin.disini ()
....dislin.errmod('PROTOCOL','ON')
....dislin.hwfont ()
....dislin.pagera ()
....dislin.pagfll (255)

....dislin.color('BLACK')
....dislin.axspos (500, 1600)
....dislin.axslen (2200, 1200)
....
....dislin.name...('x','X')
....dislin.name...('y','Y')
....
....dislin.ticks (10, 'X')
....dislin.ticks (10, 'Y')

....dislin.labels ('FLOAT','X')
....dislin.labels ('FLOAT','Y')

....dislin.incmrk(1)
....dislin.hsymbl (15)
....dislin.chacod('STANDARD')
....dislin.polcrv('LINEAR')

....x=[1.,2.,3.]
....y=[1.,2.,3.]
..........
....a=unicode("Ramón y Andrés",'Latin-1')
....dislin.titlin (a.encode('Latin-1'), 1)
....
....min_x_axis=1.
....max_x_axis=3.
....min_y_axis=1.
....max_y_axis=3....
....
....xstep=(max_x_axis - min_x_axis)/10.
....ystep=(max_y_axis - min_y_axis)/10.
....dislin.graf (min_x_axis,max_x_axis,min_x_axis,xstep \
.......,min_y_axis,max_y_axis,min_y_axis,ystep)
....
....dislin.title()
....

....dislin.curve(x,y, len(x))

....dislin.color ('foreground')
....dislin.dash...()
....dislin.xaxgit ()
....dislin.disfin ()
try_dislin()
print 'end'

May 19 '07 #2
On 19 mayo, 12:56, luis <soli...@gmail.comwrote:
Hello!

I have an unespectedn result with dislin titlin

dislin.metafl ('WMF')
dislin.disini ()

....
a="Andrés or Ramón"
dislin.titlin (a.encode("Latin-1"), 1)
# not error raised, is ok
....

dislin.disfin ()

In the output file all is ok but the title is

Andr s or Ram n

Thanks in advance!
The problem was the value of dislin.chacod. This must be 'ISO1' not
the default ('STANDAR')

May 19 '07 #3
En Sat, 19 May 2007 18:28:51 -0300, luis <so*****@gmail.comescribió:
The problem was the value of dislin.chacod. This must be 'ISO1' not
the default ('STANDAR')
I used to use DISLIN some time ago, but now I use PyChart most of the
time. Its convoluted interfase (mostly due to Fortran support, I guess)
makes it rather "ugly" to use from Python. (And has a very strange
licence, btw.)

--
Gabriel Genellina

May 19 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Gaubitzer Erwin | last post by:
Hi everybody I want to recompile the DISLIN graphics module for Python under Linux, because I think it is one of the best graphics libraries at present. The included module was for version 2.0...
1
by: Karin Lagesen | last post by:
I have a lot of data that I am going to plot and put on a web server. Since there is a lot of it, I was planning to script it all using python. I have looked around and it seems to me that dislin...
2
by: Tom Richardson | last post by:
If anyone has any experience using the graphics package DISLIN with Python, I'd appreciate some help. I am trying to use the function tifmod to change the resolution of a tif graphics file....
5
by: eesun | last post by:
Hi, I've downloaded the dislin package for the scientific plotting. And I have already created the application window with Tkinter (menu, canvas, status bar..). I want to integrate the Dislin...
6
by: Richard | last post by:
I am going to need to plot some data and formula results from Python. A few years ago I used gnuplot (not from Python) and was wondering which Python plotting module I should use (learn)? I...
1
by: pwhbeck | last post by:
Linux SUSE 10.1 Python 2.5 Dislin 9.1 Download dislin 9.1, change to directory dislin-9.1/python Change make_py to: elif test $1 = lnx ; then CC="gcc -fPIC -c -O" ...
1
by: adolfo | last post by:
I am at the very beginning of the DISLIN 9.3 Manual: 1.4 Quickplots Some quickplots are added to the DISLIN module which are collections of DISLIN routines for displaying data with one command....
3
by: adolfo | last post by:
*** I thought I posted this subject 45 min ago but it does not show so something went wrong and it does not show up. Excuse me if I repeat myself *** DISLIN 9.3 old manual problems I just...
0
by: Helmut Michels | last post by:
Dear C/C++ programmers, I am pleased to announce version 9.4 of the data plotting software DISLIN. DISLIN is a high-level and easy to use plotting library for displaying data as curves, bar...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.