Diagramme erstellen mit pgfplots



Ähnliche Dokumente
Übersicht. L A TEX Kurs. pgfplots. Pakete (hier) Daten Freihand data.dat data2.dat. Mehr... pgfplots siunitx

Grafiken für L A TEX. erstellen, bearbeiten und einbinden. Felix Koch L A TEX-User-Treffen Freiberg. 19. Juni 2011

Daniel S. Steingrube Institut für Quantenoptik Leibniz Universität Hannover.

Einführung in QtiPlot

Kurzeinführung in GNUPLOT

Einführung in das Textsatzsystem L A TEX

Computergrundlagen Visualisierung II: Gnuplot und Engauge

Musterlösung zu Serie 14

= {} +{} = {} Widerstand Kondensator Induktivität

Grafiken Teil 2. LATEX-Kurs der Unix-AG. Klaus Denker. 18. Juni 2012

Eclipse User Interface Guidelines

Effizientes Erstellen schöner Plots - keine Hexerei

Übersicht. Einbinden

Kleine Einführung in die lineare Regression mit Excel

EINFÜHRUNG IN DIE WISSENSCHAFTLICHE DATENANALYSE

Computergrundlagen Visualisierung II: Gnuplot und Engauge

Grafiken Teil 1. LATEX-Kurs der Unix-AG. Klaus Denker. 23. Mai 2007

Aufgabe 2: Anzahl Erdbeben als Funktion der Zeit

Forest-Plot in Excel 2010 erstellen

gnuplot Tool zum 2- und 3-dimensionalen Plotten von Daten: Funktionen und Datenfiles. Einfache Fits von Funktionen Viele Ausgabeformate:

PCB manuell generieren

Arbeiten mit UMLed und Delphi

In diesem Skript werden einige Plot-Typen und Funktionen beschrieben, die für die allgemeine Datenanalyse nützlich sind.

CAD Warehouse- Verbindungen. Plattformspezifische Darstellung

19. Mai 2015 L A TEX. Grafiken. Prof. Dr. Alexander Braun // Wissenschaftliche Texte mit LaTeX // WS 2014/15

T.Bosse. Institut fu r Mathematik Humboldt-Universita t zu Berlin. COMA U bung 2. T.Bosse. Einfu hrung in Beamer 1 / 18. Grundlagen Quellen

L A TEX Presentation Packages

Zahlen auf einen Blick

Ihre Interessentendatensätze bei inobroker. 1. Interessentendatensätze

Bland-Altman-Plot in Excel 2010 erstellen

1 Starten und Installation von gnuplot

Erstellen von x-y-diagrammen in OpenOffice.calc

Öffnen Sie die Albelli Gestaltungssoftware

ARCO Software - Anleitung zur Umstellung der MWSt

Toleranzschema. ArtemiS SUITE

L A TEX HSD Struktur und Formatieren II. 13. Oktober Prof. Dr. Alexander Braun // Wissenschaftliche Texte mit LaTeX // WS 2015/16

Computergrundlagen Visualisierung - Plotten Gnuplot Xmgrace

Speichern. Speichern unter

Getting Started General Workflow. Anlegen von Schablonen Ausrichtung 3.2. Atoms Precision V2 Tutorial. Working with Images Direct from Camera

Computergrundlagen Visualisierung quick&dirty: Gnuplot

Arbeit mit dem Reportgenerator

Einführung in QtiPlot

Es sollte die MS-DOS Eingabeaufforderung starten. Geben Sie nun den Befehl javac ein.

mit dem TeXnicCenter von Andreas Both

In diesem Kurs lernen Sie, wie in EXCEL Diagramme erzeugt werden und was Sie dabei beachten sollten.

Eine Anwendung mit InstantRails 1.7

Dokumentation von Ük Modul 302

Es gibt zwei Wege die elektronischen Daten aus Navision zu exportieren.

Erzeugung eines Premiumadress Datamatrix-Codes mit Hilfe der Schriftart Deutsche Post Premiumadress

Gnuplot. Justin Simon Bayer. 12. Januar 2006

Professionelle Diagramme mit Excel 2013 erstellen. Sabine Spieß Themen-Special. 1. Ausgabe, Dezember 2013 W-EX2013DI

L A TEX HSD Struktur und Formatieren II. 19. April Prof. Dr. Alexander Braun // Wissenschaftliche Texte mit LaTeX // SS 2016

OutLook 2003 Konfiguration

Professionelle Seminare im Bereich MS-Office

ÜBUNGSAUFGABEN ZU DEN LAGERFORMELN

Was ist PDF? Portable Document Format, von Adobe Systems entwickelt Multiplattformfähigkeit,

ACDSee 2009 Tutorials: Datenbankinformation in Dateien einbetten

User Manual Data 24. Login und Layout

Meine neue CNC-Steuerung mit China CNC Karte. Vorderseite. Rückseite

Einführung in GNUPLOT

Tutorial: Gnumeric installieren und Jahres-Kostenübersicht erstellen mit Diagramm

Statistische Thermodynamik I Lösungen zur Serie 1

Handbuch ECDL 2003 Basic Modul 6: Präsentation Diagramm auf einer Folie erstellen

DataTables LDAP Service usage Guide

Funktionen Häufig müssen bestimmte Operationen in einem Programm mehrmals ausgeführt werden. Schlechte Lösung: Gute Lösung:

Dokumentation. Gnuplot

Objektorientierte Programmierung für Anfänger am Beispiel PHP

Anhand des bereits hergeleiteten Models erstellen wir nun mit der Formel

7.9 Webseiten in ELO archivieren

1. Adressen für den Serienversand (Briefe Katalogdruck Werbung/Anfrage ) auswählen. Die Auswahl kann gespeichert werden.

1. Allgemein Speichern und Zwischenspeichern des Designs Auswahl der zu bearbeitenden Seite Text ergänzen Textgrösse ändern 3

Instruktionsheft für neue Webshop Hamifleurs

5.2 Neue Projekte erstellen

Datenanalysen in Excel - Diagramme

Trendlinien in Diagrammen (Excel 2010)

Tutorial Speichern. Jacqueline Roos - Riedstrasse 14, 8908 Hedingen, jroos@hispeed.ch -

Nexis Analyser. Die ersten Schritte. Analyse durchführen. Anmeldung:

Roter Faden. IMES ST : Tools Kurs FEM Programme 2011: ANSYS Classic APDL 1 ZÜRICH

Teil 2: Ablauf der Analyse festlegen

Excel Pivot-Tabellen 2010 effektiv

Umwandeln und Exportieren von Adobe-Illustrator-Dateien in Illustrator für Artcut

L A T E X-Kurs. Teil 4 - Datenanalyse - Qti Plot. Fachschaft Physik Uni Konstanz WS 2015/16

Richtlinien für das Design und das Bestellen von Nutzen für Leiterplatten im Pool

\LaTeX \today. Teil 2: L A T E X und PDF. W. Riedel, TU Chemnitz, URZ mailto:w.riedel@hrz.tu-chemnitz.de Workshop,

Grafiken mit TikZ. L A TEX-Kurs der Unix-AG. Klemens Schmitt

Einführung in gnuplot

R-Tutorial. R bietet zahlreiche Hilfe-Funktionen an. Informiere Dich über die Funktion log():

P = U eff I eff. I eff = = 1 kw 120 V = 1000 W

Verkaufsguide. Für die Closed-Beta-Version

Makros aufrufen. Übungsbeispiel Aufrufmöglichkeiten

Wertetabelle für eine Gleichung

Satzhilfen Publisher Seite Einrichten

Funktionsaufrufe der DMS Integration Office Line Evolution 2013

Aufbau von Hichert-Graphik Schritt für Schritt

BTD Antivirus Evasion: Von der Idee zum PoC. Daniel Sauder SySS GmbH

Wie können Sie eine Client Lizenz wieder freigeben?

Excel Diagramme. Dateneingabe zur späteren Verarbeitung als Diagramm

PDF Dateien für den Druck erstellen

Transkript:

Dante Herbsttagung 21 Institut für Chemische Verfahrenstechnik TU Clausthal ICVT 1

Motivation / Ziel Motivation... alles aus einem Guss aber warum dann GNUplot-Diagramme einbinden? Ziel Diagramme für einen Artikel schwarz/weiß-diagramme nicht jeden Befehl merken ICVT 2

Motivation / Ziel Motivation... alles aus einem Guss aber warum dann GNUplot-Diagramme einbinden? Ziel Diagramme für einen Artikel schwarz/weiß-diagramme nicht jeden Befehl merken ICVT 2

Motivation / Ziel Motivation... alles aus einem Guss aber warum dann GNUplot-Diagramme einbinden? Ziel Diagramme für einen Artikel schwarz/weiß-diagramme nicht jeden Befehl merken ICVT 2

Grundlagen Paket laden 1 \input pgfplots.tex % Plain TeX \usepackage{pgfplots} % LaTeX \usemodule[pgfplots] % ConTeXt ICVT 3

Grundlagen Paket laden 1 \input pgfplots.tex % Plain TeX \usepackage{pgfplots} % LaTeX \usemodule[pgfplots] % ConTeXt Standardachse 1 \begin{tikzpicture} \begin{axis} % Plot code \end{axis} 5 \end{tikzpicture} 1.5.5 1 ICVT 3

Grundlagen Paket laden 1 \input pgfplots.tex % Plain TeX \usepackage{pgfplots} % LaTeX \usemodule[pgfplots] % ConTeXt logarithmische x-achse 1 \begin{tikzpicture} \begin{semilogxaxis} % Plot code \end{semilogxaxis} 5 \end{tikzpicture} 1.5 1 1.2 1.4 ICVT 3

Grundlagen Paket laden 1 \input pgfplots.tex % Plain TeX \usepackage{pgfplots} % LaTeX \usemodule[pgfplots] % ConTeXt logarithmische Achsen 1 \begin{tikzpicture} \begin{loglogaxis} % Plot code \end{loglogaxis} 5 \end{tikzpicture} 1.4 1.2 1 1 1.2 1.4 ICVT 3

Grundlagen Paket laden 1 \input pgfplots.tex % Plain TeX \usepackage{pgfplots} % LaTeX \usemodule[pgfplots] % ConTeXt logarithmische Achsen 1 \begin{tikzpicture} \begin{loglogaxis} % Plot code \end{loglogaxis} 5 \end{tikzpicture} 1.4 1.2 1 1 1.2 1.4 neue Verbesserungen nutzen 1 \pgfplotsset{compat = newest} ICVT 3

Kleiner Datensatz Concentration Rate / mmol dm 3 / s 1 338.1 266.45 169.1 143.43 84.5 64.8 42.3 34.19 21.1 9.47 ICVT 4

Kleiner Datensatz Concentration Rate / mmol dm 3 / s 1 338.1 266.45 169.1 143.43 84.5 64.8 42.3 34.19 21.1 9.47 1 \addplot coordinates { ( 338.1, 266.45 ) ( 169.1, 143.43 ) ( 84.5, 64.8 ) 5 ( 42.3, 34.19 ) ( 21.1, 9.47 ) }; 2 1 1 2 3 ICVT 4

Kleiner Datensatz Concentration Rate / mmol dm 3 / s 1 338.1 266.45 169.1 143.43 84.5 64.8 42.3 34.19 21.1 9.47 1 \addplot coordinates { ( 338.1, 266.45 ) ( 169.1, 143.43 ) ( 84.5, 64.8 ) 5 ( 42.3, 34.19 ) ( 21.1, 9.47 ) }; 2 1 1 2 3 keine Farbe keine Linien ICVT 4

Kleiner Datensatz 1 \addplot[ color = black, fill = black, mark = *, 5 only marks ] coordinates { ( 338.1, 266.45 ) ( 169.1, 143.43 ) ( 84.5, 64.8 ) 1 ( 42.3, 34.19 ) ( 21.1, 9.47 ) }; 2 1 1 2 3 ICVT 4

Kleiner Datensatz 1 \addplot[ color = black, fill = black, mark = *, 5 only marks ] coordinates { ( 338.1, 266.45 ) ( 169.1, 143.43 ) ( 84.5, 64.8 ) 1 ( 42.3, 34.19 ) ( 21.1, 9.47 ) }; 2 1 1 2 3 Trendlinie hinzufügen ICVT 4

Kleiner Datensatz 1 \addplot[ color = black, fill = black, mark = *, 5 only marks ] coordinates {... }; \addplot[ color = black, 1 mark = none ] coordinates { (, ) ( 35, 279 ) 15 }; 3 2 1 1 2 3 ICVT 4

Kleiner Datensatz 1 \addplot[ color = black, fill = black, mark = *, 5 only marks ] coordinates {... }; \addplot[ color = black, 1 mark = none ] coordinates { (, ) ( 35, 279 ) 15 }; 3 2 1 1 2 3 Achsen beschriften Achsenlimits anpassen ICVT 4

Kleiner Datensatz 1 \begin{axis}[ xlabel = Concentration\,/\,% mmol\,dm$^{-3}$, 5 xmax = 4, xmin =, ylabel = Rate\,/\,s$^{-1}$, ymax = 3, ymin = 1 ]... Rate / s 1 3 2 1 1 2 3 4 Concentration / mmol dm 3 ICVT 4

Großer Datensatz Datenfile data-set-two.txt 1 Time a b c d 49 7 41 1.3 67 55 9 33 1.6 134 61 1 26 1.9 5 2 65 12 2 1.9... ICVT 5

Großer Datensatz Datenfile data-set-two.txt 1 Time a b c d 49 7 41 1.3 67 55 9 33 1.6 134 61 1 26 1.9 5 2 65 12 2 1.9... Einlesen des Datenfiles 1 \pgfplotstableread{data-set-two.txt} \datatable ICVT 5

Großer Datensatz Erzeugen des Plots 1 \pgfplotstableread{data-set-two.txt} \datatable \addplot table[y = a] from \datatable ; 5 \addplot table[y = b] from \datatable ; \addplot table[y = c] from \datatable ; \addplot table[y = d] from \datatable ; 6 4 2 5 1, ICVT 5

Großer Datensatz Alternative 1 \pgfplotstableread{data-set-two.txt} \datatable 6 4 2 5 5 1, \addplot table[y = a] from \datatable ; \addplot table[y = b] {data-set-two.txt} ; 1 \addplot table[y index = 3] {data-set-two.txt} ; \addplot table[y index = 4] from \datatable ; ICVT 5

Großer Datensatz Hinzufügen einer Legende 1 \addplot table[y = a] from \datatable ; \addplot table[y = b] from \datatable ; \addplot table[y = c] from \datatable ; \addplot table[y = d] from \datatable ; 5 \legend{% Component \textbf{a}, Component \textbf{b}, Component \textbf{c}, 1 Component \textbf{d}, } 6 4 2 Component a Component b Component c Component d 5 1, ICVT 5

Großer Datensatz Alternative 1 \begin{axis}[ legend entries = {% Component \textbf{a}, Component \textbf{b}, 5 Component \textbf{c}, Component \textbf{d}, }, ] 1 \addplot table[y = a] from \datatable ; \addplot table[y = b] from \datatable ; \addplot table[y = c] from \datatable ; \addplot table[y = d] from \datatable ; 6 4 2 Component a Component b Component c Component d 5 1, ICVT 5

Großer Datensatz Noch eine Alternative 1 \addplot table[y = a] from \datatable ; \addlegendentry{% Component \textbf{a}}; \addplot table[y = b] from \datatable ; 5 \addlegendentry{% Component \textbf{b}};... 6 4 2 Component a Component b Component c Component d 5 1, ICVT 5

Großer Datensatz Schönheitskorrekturen Achsenbeschriftungen hinzufügen Linien entfernen 1er Trenner entfernen 1 \pgfkeys{ /pgf/number format/ set thousands separator = } Relative amount / % 8 6 4 2 Component a Component b Component c Component d 2 4 6 8 1 Time / s ICVT 5

Großer Datensatz Eigene Marker definieren 1 \pgfdeclareplotmark{halfcircle}{% \begin{pgfscope} \pgfsetfillcolor{white}% \pgfpathcircle{\pgfpoint{pt}{pt}} 5 {\pgfplotmarksize} \pgfusepathqfillstroke \end{pgfscope}% \pgfpathmoveto {\pgfpoint{\pgfplotmarksize}{pt}} 1 \pgfpatharc{}{18}{\pgfplotmarksize} \pgfpathclose \pgfusepathqfill } Ergebnis (2 %) ICVT 6

Großer Datensatz neuen Marker verwenden 1 \addplot[mark = halfcircle,...... mit Optionen 1 \addplot[ mark = halfcircle, mark options = {rotate = 9}, Legende verschieben 1 [ ] legend style = { at = {(.6,.75)}} ICVT 7

Relative amount / % 8 7 6 5 4 3 2 1 Component a Component b Component c Component d 2 4 6 8 1 Time / s ICVT 8

Ein experimentelles Spektrum 1 [ was wir schon kennen xlabel = Chemische Verschiebung\,/\,ppm, xmin = 18,.5 5 xmax = 24, ymax = 1.25, ymin = ] \addplot[ 18 2 22 24 color = black, Chemische Verschiebung / ppm 1 mark = none ] table {plots/data/data-set-three.txt}; 1 ICVT 9

Ein experimentelles Spektrum y-achsenbeschriftung entfernen 1 [yticklabels = ] 18 2 22 24 Chemical shift / ppm ICVT 1

Ein experimentelles Spektrum y-achsenbeschriftung entfernen 1 [yticklabels = ] x-achse umdrehen 1 \addplot[ x dir = reverse,... 24 22 2 18 Chemical shift / ppm ICVT 1

Ein experimentelles Spektrum Peaks beschriften 1 \node[ coordinate, pin = {[rotate=9]right:22.26} ] at (axis cs:22.26,1.1) { }; 22.26 ICVT 11

Ein experimentelles Spektrum Peaks beschriften 1 \node[ coordinate, pin = {[rotate=9]right:22.26} ] at (axis cs:22.26,1.1) { }; 22.26 gedrehte Beschriftung 1 \node[ coordinate, pin = {[rotate=9]5:22.32} ] at (axis cs:22.32,1.1) { }; 22.32 ICVT 11

Ein experimentelles Spektrum 1 [ x dir = reverse, xlabel = Chemical shift\,/\,ppm, xmin = 18, 5 xmax = 24, ymax = 1.75, ymin =, yticklabels = ] \addplot[ 1 color = black, mark = none ] table from {plots/data/data-set-three.txt}; 22.32 22.26 21.96 21.9 21.26 19.3 18.32 \node[ 15 coordinate, pin = {[rotate=9]5:22.32} ] at (axis cs:22.32,1.1) { }; \node[ coordinate, pin = {[rotate=9]right:22.26} 2 ] at (axis cs:22.26,1.1) { };... 24 23 22 21 2 19 18 Chemical shift / ppm ICVT 12

Funktionen mit GNUplot Formel E(Θ) = K (K Θ)K 1 (K 1)! exp( K Θ) ICVT 13

Funktionen mit GNUplot Formel E(Θ) = K 1 % number of CSTRs \newcommand\k{3} (K Θ)K 1 (K 1)! exp( K Θ) E(Θ) 1.8.6.4.2 \addplot gnuplot[ 5 id=cascade_model_full, domain=\xmin:\xmax, samples=11, ] {\K * (\K*x)^(\K-1) / (\K-1)! 1 * exp(-\k * x)}; 1 2 3 Θ -shell-escape nicht vergessen ICVT 13

Funktionen mit GNUplot cascade_model_full.gnuplot 1 set table "cascade_model_full.table"; set format "%.5f" set format "%.7e";; set samples 11; set dummy x,y; plot [x=:3] 3* (3* cascade_model_full.table 1 # Curve of 1, 11 points # Curve title: "3* (3*x)**(3-1) / (3-1)! * exp(-3* x)" # x y type.e+.e+ i 3.e-2 1.114264e-2 i 6.e-2 4.594132e-2 i... ICVT 14

Funktionen mit GNUplot 1 E(Θ).8.6.4 Anteil des abfließenden Stromes, der älter als Θ ist..2.5 1 1.5 2 2.5 3 Θ Θ ICVT 15

Berechnungen mit GNUplot (und Co.) erstes Beispiel noch einmal (Kleiner Datensatz) 3 Rate / s 1 2 1 1 2 3 4 Concentration / mmol dm 3 ICVT 16

Berechnungen mit GNUplot (und Co.) erstes Beispiel noch einmal (Kleiner Datensatz) 1... % plot regression curve with GNUplot (calculated also by GNUplot) \addplot [raw gnuplot] gnuplot [id=conc_rate] { 5 % define function which should be fitted f(x)=a*x; % let gnuplot fit using column 1 and 2 of the data file fit f(x) conc_rate.txt using 1:2 via a; % Plot the function with the specified plot range 1 plot [x=\xmin:35] f(x); }; ICVT 16

Berechnungen mit GNUplot (und Co.) erstes Beispiel noch einmal (Kleiner Datensatz) 3 measured data external program + pgfplots 2 external program + GNUplot everything GNUplot everything pgfplots Rate / s 1 1 1 2 3 4 Concentration / mmol dm 3 ICVT 16

Rate / Berechnungen mit GNUplot (und Co.) erstes Beispiel noch einmal (Kleiner Datensatz) Rate / s 1 3 2 1 1 measured measured data external program + pgfplots external program + GNUplot everything external GNUplot p everything pgfplots external p everything Concentration everything Diagramme erstellen mit / pgfplots mm 1 2 3 1 2 3 4 Concentration / mmol dm 3 ICVT 16

Diagramme exportieren nach PDF 1 \usetikzlibrary{pgfplots.external} \tikzexternalize nach EPS ICVT 17

Diagramme exportieren nach PDF 1 \usetikzlibrary{pgfplots.external} \tikzexternalize nach EPS 1 \tikzset{external/system call = {latex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"; dvips -o "\image".ps "\image".dvi}} ICVT 17

Zusammenfassung pgfplots ist ein mächtiges Paket zum Erstellen von Diagrammen Die Diagramme sind verschiedensten Typs (Linien, Balken, 2D, 3D, Dreieck) hoher Qualität konsistent zum restlichen Dokument leicht anpassbar im Stil Keine Drittsoftware nötig ICVT 18

Literatur J. Wright Plotting experimental data using pgfplots TUGboat 31:1, 21, p. 5 https: //www.tug.org/members/tugboat/tb31-1/tb97wright-pgfplots.pdf Chr. Feuersänger pgfplots manual http://pgfplots.sourceforge.net/pgfplots.pdf http://pgfplots.sourceforge.net/pgfplotstable.pdf T. Tantau pgf / TikZ manual http://sourceforge.net/projects/pgf ICVT 19

2 25 15 Using Coordinate Filters to fix z = 1.4 1 φxφy φx φy 2 1.8 1.5.2.4.6.8 1.5 1 15 1 5 1 2 3 5 2 4 6 8 1 12 14 16 1min load nodes cpus processes 1 7 f(x, y) = x y 1.2.4.6.8 x 1.5 y 1.6.4.2 12 7 7 6.5 15 1.5 1.8.6.4.2 1.5 115 11 15 1 4 2 2 4 Population 6 5 4 3 5 5 4.5 4.2 4.3 4 3.8 3.3 193 194 195 196 197 Far Near 1 5 5 1 15 6 4 2 2 4 6 1 9 7 1 5 tan(x) 5 l3 3 1 1 1 1 3 l2 5 7 9 1 1 3 5 7 9 l1.5.5 1 1.5 2.5 1 1 1 6 1 3 2 π π/2 π/2 3 2 π 5 L2 Error 1 1 1 2 1 3 1 4 d = 2 d = 3 d = 4 d = 5 d = 6 3, model estimate 2, 1, 1,.5.4.3 1 1 5 1 1 1 2 1 3 1 4 1 5 1 6 Degrees of freedom 2, 3, 6 4 2 2 4 6.2 Class 1 Class 2.1 Class 3 Line.2.4.6.8 1 4 2 2 4 2 2 4 4