473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 2201
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.