Skip to content
Snippets Groups Projects
Commit 0d7ec8a1 authored by Sai Lakhan Ekal's avatar Sai Lakhan Ekal
Browse files

Added separate Y axis for Magnitude and Humidity in subplot

parent 0c380d48
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ import numpy
from argparse import ArgumentParser
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import climate_chamber
import VNA
import virtual_time
......@@ -191,26 +192,33 @@ class Measurements:
return equilibrium_indicator
def plot_output(self, output_file):
data = pd.read_csv(output_file)
fig, ax1 = plt.subplots(2, figsize=(8,8))
fig, ax1 = plt.subplots(2, figsize=(8, 8))
fig.suptitle("Graphical representation of chamber output", color="red")
ax1[0].scatter(data.TIMESTAMP, data.S11_PHASE, color='red', marker='<')
ax1[0].scatter(data.TIMESTAMP, data.S11_MAGNITUDE, color='pink', marker='4')
ax1[0].scatter(data.TIMESTAMP, data.EQUILIBRIUM_INDICATOR, color='black', marker=".")
ax1[0].scatter(data.TIMESTAMP, data.S11_PHASE, c='red', marker='<')
ax2_0 = ax1[0].twinx()
ax2_0.scatter(data.TIMESTAMP, data.S11_MAGNITUDE, c='#002B5B', marker='4')
ax3_0 = ax1[0].twinx()
ax3_0.scatter(data.TIMESTAMP, data.EQUILIBRIUM_INDICATOR, c='black', marker=".")
ax1[0].set_xlabel("TIMESTAMP")
ax1[0].set_ylabel("PHASE, MAGNITUDE", color='red')
ax1[0].set_ylabel("PHASE", color='red')
ax2_0.set_ylabel("MAGNITUDE", color='#002B5B')
ax1[0].grid(True, linestyle=":")
ax1[0].legend(["Phase", "Magnitude", 'Equilibrium_indicator'], loc=6, fontsize=10)
ax1[1].scatter(data.TIMESTAMP, data.READBACK_TEMPERATURE, color='blue', marker='p')
ax1[1].scatter(data.TIMESTAMP, data.READBACK_HUMIDITY, color='green', marker="*")
ax1[1].scatter(data.TIMESTAMP, data.EQUILIBRIUM_INDICATOR, color='black', marker=".")
ax1[1].scatter(data.TIMESTAMP, data.READBACK_TEMPERATURE, c='blue', marker='p')
ax2_1 = ax1[1].twinx()
ax1[1].scatter(data.TIMESTAMP, data.READBACK_HUMIDITY, c='green', marker="*")
ax3_1 = ax1[1].twinx()
ax3_1.scatter(data.TIMESTAMP, data.EQUILIBRIUM_INDICATOR, c='black', marker=".")
ax1[1].set_xlabel("TIMESTAMP")
ax1[1].set_ylabel("TEMPERATURE, HUMIDITY", color='blue')
ax1[1].set_ylabel("TEMPERATURE ", color='blue')
ax2_1.set_ylabel("HUMIDITY", color='green')
ax1[1].grid(True, linestyle=":")
ax1[1].legend(["Temperature", "Humidity", 'Equilibrium_indicator'], loc=6, fontsize=10)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment