[Scilab-users] plotxxyyy

Frieder Nikolaisen Frieder.Nikolaisen at student.hs-rm.de
Fri Sep 30 11:17:12 CEST 2016


Hello everybody,

with you help I got my programm so far running pretty well. Now I have 
trouble again with the plotting. I used the demos_gui plotyyy, but want 
now the plotxxyyy. How to implement xx? I attach my minimal example with 
a random Matrix, instead of the real one I use.

This programm will be used at my theses. So I want to do correct 
quotes. I am used how to do this a text, but how is it done in a 
programm?

I do get Errors, if I do not open the example plotyyy - is this really 
necessary?
" plotyyy=uigetfile('plotyyy.dem.sce');  mopen(plotyyy)        "


Best regards
Frieder Nikolaisen




The minimal Code:

//Write your callback for  Diagramm  here

A=rand(15,50)

//Dieser Code und geistiges Eigentum von Samuel GOUGEON wird geändert 
und angepasst von Frieder Nikolaisen (FN), bleibt in seinen Grundzügen 
jedoch erhalten

// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2010 Samuel GOUGEON
// Copyright (C) 2010 - DIGITEO - Allan CORNET
//
// This file is released under the 3-clause BSD license. See 
COPYING-BSD.

function demo_plotyyy()

plotyyy=uigetfile('plotyyy.dem.sce')      // hinzugefügt von FN  
(changed by Frieder Nikolaisen)
mopen(plotyyy)                                                          
// hinzugefügt von FN

     // DEMO START
     // A plotyyy() example: 
//http://bugzilla.scilab.org/show_bug.cgi?id=6070

     my_handle = scf(100000);
     clf(my_handle);

     // Preparing data
     x  = A(:,1);            //Serial Date Number    geändert durch FN 
(changed by Frieder Nikolaisen)
     y2 =  A(:,5);           //Leistung              geändert durch FN
     y3 = A(:,7)             //Beschleunigung        geändert durch FN


     drawlater()
     demo_viewCode("plotyyy.dem.sce");

     // Axis y1
     y1=A(:,4);              //Drehzahl              geändert durch FN
     plot2d(x,y1)
     xtitle([gettext("Leistung, Drehzahl und Beschleunigung");" "],..
     gettext("Serial Date Numbers"),gettext("Drehzahl in U/min"));    // 
geändert durch FN

     // Axis y2
     c=color("blue");
     na=newaxes();
     na.foreground=c;
     na.font_color=c;
     plot2d(x,y2,style=c)
     ylabel("Leistung in Watt","color",[0 0 1]) // geändert durch FN
     na.children(1).children(1).thickness=2;
     na.filled="off";
     na.axes_visible(1)="off";
//    na.axes_reverse(2)="on";
     na.y_location="middle";

     // Axis y3
     c=color("red");
     na=newaxes();
     na.foreground=c;                        // Axis and ticks color
     na.font_color=c;                        // Labels's color
     plot2d(x,y3,style=c);
     ylabel("Beschleunigung in m/s","color",[1 0 0]) // geändert durch 
FN
     na.filled="off";                        // Transparent background, 
letting the first plot appearing
     na.axes_visible(1)="off";               // Masking the x axis 
(useless overlay)
     na.y_location="right";                  // Y axis on the right side
     na.children(1).children(1).thickness=2; // Curve thickness

     drawnow()

     // DEMO END
mclose(plotyyy)

endfunction

demo_plotyyy();
clear demo_plotyyy;

// Code von Samuel GOUGEON endet

set(handles.Anzeige, 'string','Ausgangsdiagramm erstellt')





More information about the users mailing list